Hive
  1. Hive
  2. HIVE-6039

Round, AVG and SUM functions reject char/varch input while accepting string input

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.13.0
    • Component/s: UDF
    • Labels:
      None

      Description

      An error similar to the following will occur:

      hive> create table tabs (c char(8), vc varchar(10)) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t';
      hive> select sum(c), avg(c), sum(vc), avg(vc) from tabs;
      FAILED: UDFArgumentTypeException Only numeric or string type arguments are accepted but char(8) is passed.
      

        Issue Links

          Activity

          Hide
          Hive QA added a comment -

          Overall: +1 all checks pass

          Here are the results of testing the latest attachment:
          https://issues.apache.org/jira/secure/attachment/12618986/HIVE-6039.patch

          SUCCESS: +1 4790 tests passed

          Test results: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/658/testReport
          Console output: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/658/console

          Messages:

          Executing org.apache.hive.ptest.execution.PrepPhase
          Executing org.apache.hive.ptest.execution.ExecutionPhase
          Executing org.apache.hive.ptest.execution.ReportingPhase
          

          This message is automatically generated.

          ATTACHMENT ID: 12618986

          Show
          Hive QA added a comment - Overall : +1 all checks pass Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12618986/HIVE-6039.patch SUCCESS: +1 4790 tests passed Test results: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/658/testReport Console output: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/658/console Messages: Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase This message is automatically generated. ATTACHMENT ID: 12618986
          Hide
          Xuefu Zhang added a comment -
          Show
          Xuefu Zhang added a comment - RB: https://reviews.apache.org/r/16329/
          Hide
          Prasad Mujumdar added a comment -

          Looks fine to me.
          +1

          Show
          Prasad Mujumdar added a comment - Looks fine to me. +1
          Hide
          Xuefu Zhang added a comment -

          Patch committed to trunk. Thank Prasad for the review.

          Show
          Xuefu Zhang added a comment - Patch committed to trunk. Thank Prasad for the review.

            People

            • Assignee:
              Xuefu Zhang
              Reporter:
              Xuefu Zhang
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development