Vineet Garg created HIVE-20910:
----------------------------------

             Summary: Insert in bucketed table fails due to dynamic partition 
sort optimization
                 Key: HIVE-20910
                 URL: https://issues.apache.org/jira/browse/HIVE-20910
             Project: Hive
          Issue Type: Bug
    Affects Versions: 4.0.0
            Reporter: Vineet Garg
            Assignee: Vineet Garg


*Repro*
{code:sql}
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');

{code}

{noformat}
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
{noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to