You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by "wyp (JIRA)" <ji...@apache.org> on 2017/10/19 05:53:00 UTC

[jira] [Created] (CARBONDATA-1595) Support static and partition dynamic in insert into/overwrite DML

wyp created CARBONDATA-1595:
-------------------------------

             Summary: Support static and partition dynamic in insert into/overwrite DML
                 Key: CARBONDATA-1595
                 URL: https://issues.apache.org/jira/browse/CARBONDATA-1595
             Project: CarbonData
          Issue Type: Sub-task
          Components: sql
    Affects Versions: 1.2.0
            Reporter: wyp


In [CARBONDATA-910|https://issues.apache.org/jira/browse/CARBONDATA-910]  carbondata implement partition feature, it's very useful. But if we want add partition data in carbondata table,we must be use {{ alter}} syntax as following:
{code}
carbon.sql("ALTER TABLE temp.test_table ADD PARTITION('2017-10-18', '2017-10-19')")
{code}
If you have many partitions that should be add to some table, you should run the sql many times, It's boring and inefficiency. So it;s very useful to support static and partition dynamic in insert into/overwrite DML:
{code}
Static partition:
INSERT OVERWRITE TABLE tablename1 [PARTITION (partcol1=val1) [IF NOT EXISTS]] select_statement1 FROM from_statement;
INSERT INTO TABLE tablename1 [PARTITION (partcol1=val1)] select_statement1 FROM from_statement;

Dynamic partition:
INSERT OVERWRITE TABLE tablename1 [PARTITION (partcol1) [IF NOT EXISTS]] select_statement1 FROM from_statement;
INSERT INTO TABLE tablename1 [PARTITION (partcol1)] select_statement1 FROM from_statement;
{code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)