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

ColumnPruner is not working on LateralView

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.10.0
    • 0.10.0
    • Query Processor
    • None
    • Reviewed

    Description

      Column pruning is not applied to LVJ and SEL operator, which makes exceptions at various stages. For example,

      drop table array_valued_src;
      create table array_valued_src (key string, value array<string>);
      insert overwrite table array_valued_src select key, array(value) from src;
      
      select sum(val) from (select a.key as key, b.value as array_val from src a join array_valued_src b on a.key=b.key) i lateral view explode (array_val) c as val;
      
      ... 9 more
      Caused by: java.lang.RuntimeException: Reduce operator initialization failed
      	at org.apache.hadoop.hive.ql.exec.ExecReducer.configure(ExecReducer.java:157)
      	... 14 more
      Caused by: java.lang.RuntimeException: cannot find field _col0 from [0:_col5]
      	at org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorUtils.getStandardStructFieldRef(ObjectInspectorUtils.java:345)
      	at org.apache.hadoop.hive.serde2.objectinspector.StandardStructObjectInspector.getStructFieldRef(StandardStructObjectInspector.java:143)
      	at org.apache.hadoop.hive.ql.exec.ExprNodeColumnEvaluator.initialize(ExprNodeColumnEvaluator.java:57)
      	at org.apache.hadoop.hive.ql.exec.Operator.initEvaluators(Operator.java:896)
      	at org.apache.hadoop.hive.ql.exec.Operator.initEvaluatorsAndReturnStruct(Operator.java:922)
      	at org.apache.hadoop.hive.ql.exec.SelectOperator.initializeOp(SelectOperator.java:60)
      	at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:357)
      	at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:433)
      	at org.apache.hadoop.hive.ql.exec.Operator.initializeChildren(Operator.java:389)
      	at org.apache.hadoop.hive.ql.exec.JoinOperator.initializeOp(JoinOperator.java:62)
      	at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:357)
      	at org.apache.hadoop.hive.ql.exec.ExecReducer.configure(ExecReducer.java:150)
      

      Attachments

        1. HIVE-3226.2.patch.txt
          42 kB
          Navis Ryu
        2. HIVE-3226.1.patch.txt
          41 kB
          Navis Ryu

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: