Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-2329

Not using map aggregation, fails to execute group-by after cluster-by with same key

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.9.0
    • Query Processor
    • None
    • Reviewed

    Description

      hive.map.aggr=false
      select Q1.key_int1, sum(Q1.key_int1), sum(distinct Q1.key_int1) from (select * from t1 cluster by key_int1) Q1 group by Q1.key_int1

      resulted..

      FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.MapRedTask

      from hadoop logs..

      Caused by: java.lang.RuntimeException: cannot find field key from []
      at org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorUtils.getStandardStructFieldRef(ObjectInspectorUtils.java:321)
      at org.apache.hadoop.hive.serde2.objectinspector.StandardStructObjectInspector.getStructFieldRef(StandardStructObjectInspector.java:119)
      at org.apache.hadoop.hive.ql.exec.ExprNodeColumnEvaluator.initialize(ExprNodeColumnEvaluator.java:82)
      at org.apache.hadoop.hive.ql.exec.GroupByOperator.initializeOp(GroupByOperator.java:198)
      at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:357)
      at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:433)
      ........

      I think the problem is caused by ReduceSinkDeDuplication, removing RS which was providing rs.key for GBY operation. If child of child RS is a GBY, we should bypass the optimization.

      Attachments

        1. ASF.LICENSE.NOT.GRANTED--HIVE-2329.D657.1.patch
          11 kB
          Phabricator
        2. HIVE-2329.1.patch.txt
          3 kB
          Navis Ryu

        Issue Links

          Activity

            People

              navis Navis Ryu
              navis Navis Ryu
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: