Login  Register

[GitHub] [carbondata] ShreelekhyaG opened a new pull request #4151: [WIP] Fix - from xx Insert into select fails if an SQL statement contains multiple inserts

Posted by GitBox on Jun 15, 2021; 5:17am
URL: http://apache-carbondata-dev-mailing-list-archive.168.s1.nabble.com/GitHub-carbondata-ShreelekhyaG-opened-a-new-pull-request-4151-WIP-Fix-from-xx-Insert-into-select-fais-tp108907.html


ShreelekhyaG opened a new pull request #4151:
URL: https://github.com/apache/carbondata/pull/4151


    ### Why is this PR needed?
    When multiple inserts with single query is used, it fails from SparkPlan with: `java.lang.ClassCastException: GenericInternalRow cannot be cast to UnsafeRow`.
   For every successful insert/load we return Segment ID as a row. For multiple inserts also, we are returning a row containing Segment ID but while processing in spark `ClassCastException` is thrown.
   
    ### What changes were proposed in this PR?
   When multiple insert query is given, it uses `Union` node. Based on its presence, made changes to use flag `isMultipleInserts` to identify and return empty row.
       
    ### Does this PR introduce any user interface change?
    - No
   
    ### Is any new testcase added?
    - Yes
   
       
   


--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[hidden email]