Uploaded image for project: 'CarbonData'
  1. CarbonData
  2. CARBONDATA-4211

from xx Insert into select fails if an SQL statement contains multiple inserts

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.2.0
    • 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;

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            Shreelekhya SHREELEKHYA GAMPA
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h 40m
                1h 40m