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

Insert in bucketed table fails due to dynamic partition sort optimization

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.0.0
    • 4.0.0-alpha-1
    • None
    • None

    Description

      Repro

      CREATE TABLE tbl_lbodor_1 (ca_address_sk int, ca_address_id string, ca_street_number string, ca_street_name string,
          ca_street_type string, ca_suite_number string, ca_city string, ca_county string, ca_state string,
          ca_zip string, ca_country string, ca_gmt_offset decimal(5,2))
          PARTITIONED BY (ca_location_type string)
          CLUSTERED BY (ca_state) INTO 50 BUCKETS STORED AS ORC TBLPROPERTIES('transactional'='true');
      
      INSERT INTO TABLE tbl_lbodor_1 PARTITION (ca_location_type) VALUES (5555, 'AAAAAAAADLFBAAAA', '126',
                      'Highland Park', 'Court', 'Suite E', 'San Jose', 'King George County', 'VA', '28003', 'United States',
                      '-5', 'single family');
      
      
      Caused by: java.lang.ClassCastException: org.apache.hadoop.hive.ql.exec.vector.Decimal64ColumnVector cannot be cast to org.apache.hadoop.hive.ql.exec.vector.BytesColumnVector
      	at org.apache.hadoop.hive.ql.io.orc.WriterImpl.setColumn(WriterImpl.java:184)
      	at org.apache.hadoop.hive.ql.io.orc.WriterImpl.setColumn(WriterImpl.java:237)
      	at org.apache.hadoop.hive.ql.io.orc.WriterImpl.addRow(WriterImpl.java:308)
      	at org.apache.hadoop.hive.ql.io.orc.OrcRecordUpdater.addSimpleEvent(OrcRecordUpdater.java:423)
      	at org.apache.hadoop.hive.ql.io.orc.OrcRecordUpdater.addSplitUpdateEvent(OrcRecordUpdater.java:431)
      	at org.apache.hadoop.hive.ql.io.orc.OrcRecordUpdater.insert(OrcRecordUpdater.java:483)
      	at org.apache.hadoop.hive.ql.exec.FileSinkOperator.process(FileSinkOperator.java:995)
      	at org.apache.hadoop.hive.ql.exec.vector.VectorFileSinkOperator.process(VectorFileSinkOperator.java:111)
      	at org.apache.hadoop.hive.ql.exec.Operator.vectorForward(Operator.java:965)
      	at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:938)
      	at org.apache.hadoop.hive.ql.exec.vector.VectorSelectOperator.process(VectorSelectOperator.java:158)
      	at org.apache.hadoop.hive.ql.exec.tez.ReduceRecordSource.processVectorGroup(ReduceRecordSource.java:490)
      	... 20 more
      

      Attachments

        1. HIVE-20910.1.patch
          11 kB
          Vineet Garg
        2. HIVE-20910.2.patch
          11 kB
          Vineet Garg
        3. HIVE-20910.3.patch
          11 kB
          Vineet Garg
        4. HIVE-20910.4.patch
          12 kB
          László Bodor

        Issue Links

          Activity

            People

              vgarg Vineet Garg
              vgarg Vineet Garg
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: