Hive
  1. Hive
  2. HIVE-2223

support grouping on complex types in Hive

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.8.0
    • Component/s: Query Processor
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Creating a query with a GROUP BY statement when an array type column is part of the column list is not yet supported:

      CREATE TABLE test_group_by ( key INT, group INT, terms ARRAY<STRING>);
      SELECT key, terms, count(group) FROM test_group_by GROUP BY key, terms;
      ...
      "Hash code on complex types not supported yet."

      java.lang.RuntimeException: Error while closing operators
      at org.apache.hadoop.hive.ql.exec.ExecMapper.close(ExecMapper.java:232)
      at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:57)
      at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:356)
      at org.apache.hadoop.mapred.MapTask.run(MapTask.java:305)
      at org.apache.hadoop.mapred.Child.main(Child.java:170)
      Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.RuntimeException: Hash code on complex types not supported yet.
      at org.apache.hadoop.hive.ql.exec.GroupByOperator.closeOp(GroupByOperator.java:799)
      at org.apache.hadoop.hive.ql.exec.Operator.close(Operator.java:462)
      at org.apache.hadoop.hive.ql.exec.Operator.close(Operator.java:470)
      at org.apache.hadoop.hive.ql.exec.Operator.close(Operator.java:470)
      at org.apache.hadoop.hive.ql.exec.Operator.close(Operator.java:470)
      at org.apache.hadoop.hive.ql.exec.ExecMapper.close(ExecMapper.java:211)
      ... 4 more
      Caused by: java.lang.RuntimeException: Hash code on complex types not supported yet.
      at org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorUtils.hashCode(ObjectInspectorUtils.java:348)
      at org.apache.hadoop.hive.ql.exec.ReduceSinkOperator.processOp(ReduceSinkOperator.java:187)
      at org.apache.hadoop.hive.ql.exec.Operator.process(Operator.java:386)
      at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:598)
      at org.apache.hadoop.hive.ql.exec.GroupByOperator.forward(GroupByOperator.java:746)
      at org.apache.hadoop.hive.ql.exec.GroupByOperator.closeOp(GroupByOperator.java:780)
      ... 9 more

      1. HIVE-2223.patch
        22 kB
        Jonathan Chang
      2. HIVE-2223.patch.2
        22 kB
        Jonathan Chang
      3. HIVE-2223.patch.3
        23 kB
        Jonathan Chang

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Jonathan Chang
            Reporter:
            Kathleen Ting
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development