Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
When multiple inserts with single query is used, it fails from SparkPlan with: java.lang.ClassCastException: GenericInternalRow cannot be cast to UnsafeRow.
[Steps] :-
From Spark SQL execute the following queries
1、create tables:
create table catalog_returns_5(cr_returned_date_sk int,cr_returned_time_sk int,cr_item_sk int)ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' LINES TERMINATED BY '\n' ;
create table catalog_returns_6(cr_returned_time_sk int,cr_item_sk int) partitioned by (cr_returned_date_sk int) STORED BY 'org.apache.carbondata.format' TBLPROPERTIES ( 'table_blocksize'='64');
2、insert table:
from catalog_returns_5 insert overwrite table catalog_returns_6 partition (cr_returned_date_sk) select cr_returned_time_sk, cr_item_sk, cr_returned_date_sk where cr_returned_date_sk is not null distribute by cr_returned_date_sk insert overwrite table catalog_returns_6 partition (cr_returned_date_sk) select cr_returned_time_sk, cr_item_sk, cr_returned_date_sk where cr_returned_date_sk is null distribute by cr_returned_date_sk;