You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by "anubhav tarar (JIRA)" <ji...@apache.org> on 2017/12/14 12:07:03 UTC

[jira] [Commented] (CARBONDATA-1681) Carbon 1.3.0-Partitioning:After dropping the partition, the data is also getting dropped.

    [ https://issues.apache.org/jira/browse/CARBONDATA-1681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16290760#comment-16290760 ] 

anubhav tarar commented on CARBONDATA-1681:
-------------------------------------------

@Ayushi Sharma i tried this and this is working fine


    spark.sql("drop table if exists part_nation_drop")


    spark.sql("create table part_nation_drop (N_NATIONKEY BIGINT,N_REGIONKEY BIGINT,N_COMMENT STRING) partitioned by (N_NAME STRING) stored by 'carbondata' tblproperties('partition_type'='list','list_info'='ALGERIA,ARGENTINA,BRAZIL,CANADA,(EGYPT,ETHIOPIA,FRANCE),JAPAN')")

    spark.sql("load data inpath '/home/anubhav/Downloads/dbgen/nation.tbl' into table part_nation_drop options('DELIMITER'='|','FILEHEADER'='N_NATIONKEY,N_NAME,N_REGIONKEY,N_COMMENT')")

    spark.sql("select * from part_nation_drop where N_Name='ALGERIA'").show()

    spark.sql("ALTER TABLE part_nation_drop DROP PARTITION(1)").show()

    spark.sql("select * from part_nation_drop where N_Name='ALGERIA'").show()


> Carbon 1.3.0-Partitioning:After dropping the partition, the data is also getting dropped.
> -----------------------------------------------------------------------------------------
>
>                 Key: CARBONDATA-1681
>                 URL: https://issues.apache.org/jira/browse/CARBONDATA-1681
>             Project: CarbonData
>          Issue Type: Bug
>          Components: sql
>    Affects Versions: 1.3.0
>            Reporter: Ayushi Sharma
>            Assignee: anubhav tarar
>         Attachments: drop_part1.PNG, drop_part_2.PNG
>
>
> create table part_nation_drop (N_NATIONKEY BIGINT,N_REGIONKEY BIGINT,N_COMMENT STRING) partitioned by (N_NAME STRING) stored by 'carbondata' tblproperties('partition_type'='list','list_info'='ALGERIA,ARGENTINA,BRAZIL,CANADA,(EGYPT,ETHIOPIA,FRANCE),JAPAN');
> show partitions part_nation_drop;
> load data inpath '/spark-warehouse/tpchhive.db/nation/nation.tbl' into table part_nation_drop options('DELIMITER'='|','FILEHEADER'='N_NATIONKEY,N_NAME,N_REGIONKEY,N_COMMENT');
> select * from part_nation_drop where N_Name='ALGERIA';
> ALTER TABLE part_nation_drop DROP PARTITION(1);
> select * from part_nation_drop where N_Name='ALGERIA';



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