Hive
  1. Hive
  2. HIVE-2271

InConsistency between Infomation Document and Actual Behavior for Built In Aggregate Functions(UDAF) Return Type.

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 0.5.0, 0.6.0, 0.7.0, 0.7.1
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      SuSE-Linux-11

      Description

      I followed the Information Document for executing UDAF like MIN(),MAX(),SUM(),AVG() and COUNT() below link.

      https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF#LanguageManualUDF-BuiltinAggregateFunctions%28UDAF%29

      Observed mismatch for RETURN TYPE mentioned in Information Document and Actual Behavior.

      1.) Return Type for min(colName),max(colName) is mentioned as DOUBLE,but while retrieving it is returning colName DataType passed to Min()/Max().

      Ex:
      1).create table test(a int,b smallint,c string);
      2).select min(a) from test;
      3).ResultSet.getMetaData ().getColumnTypeName ( 1 )
      Output : int
      Expected : double(According to InformationDoc)

      2.) Return Type for sum(colName) is mentioned as DOUBLE,but while retrieving it is always returning as BIGINT

      Ex:
      1).create table test(a int,b smallint,c string);
      2).select sum(a) from test;
      3).ResultSet.getMetaData ().getColumnTypeName ( 1 )
      Output : BIGINT
      Expected : double(According to InformationDoc)

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Rohith
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development