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

Hive DELETE Query with join condition on transactional table fails with HiveException: Unexpected column vector type STRUCT

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 3.1.2
    • None
    • None

    Description

      Hive delete query with join on transactional table fails with HiveException: Unexpected column vector type STRUCT.

       

      Repro Queries:

      CREATE TABLE tab_s(a int) STORED AS ORC TBLPROPERTIES ('orc.compress'='SNAPPY');
      INSERT INTO tab_s values(1);
      CREATE TABLE tab_t(a int) STORED AS ORC TBLPROPERTIES ('orc.compress'='SNAPPY','transactional'='true');
      INSERT INTO tab_t select * from tab_s;
      DELETE FROM tab_t  WHERE EXISTS (select tab_s.a from tab_s where tab_s.a=tab_t.a);


      Workaround:

      This issue is seen with vectorized execution enabled. If we disable the vectorization, the query will run smoothly.

      Property value change:

      hive.vectorized.execution.enabled=false in hive-site.xml


      Log: (Full attached)

      Caused by: java.lang.RuntimeException: Map operator initialization failed
          at org.apache.hadoop.hive.ql.exec.tez.MapRecordProcessor.init(MapRecordProcessor.java:354)
          at org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:266)
          ... 16 more
      Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Unexpected column vector type STRUCT
          at org.apache.hadoop.hive.ql.exec.vector.VectorCopyRow.init(VectorCopyRow.java:302)
          at org.apache.hadoop.hive.ql.exec.vector.mapjoin.VectorMapJoinCommonOperator.initializeOp(VectorMapJoinCommonOperator.java:419)
          at org.apache.hadoop.hive.ql.exec.vector.mapjoin.VectorMapJoinGenerateResultOperator.initializeOp(VectorMapJoinGenerateResultOperator.java:115)
          at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:376)
          at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:573)
          at org.apache.hadoop.hive.ql.exec.Operator.initializeChildren(Operator.java:525)
          at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:386)
          at org.apache.hadoop.hive.ql.exec.tez.MapRecordProcessor.init(MapRecordProcessor.java:335)
          ... 17 more

       

      Attachments

        1. hive_error_unexpected_col.log
          11 kB
          Sathyendra

        Activity

          People

            Unassigned Unassigned
            sathya12 Sathyendra
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: