marchpure opened a new pull request #3982:
URL: https://github.com/apache/carbondata/pull/3982


   
    ### Why is this PR needed?
   1. CREATE TABLE droppartition (id STRING, sales STRING) PARTITIONED BY (dtm 
STRING)STORED AS carbondata
   2.
   insert into droppartition values ('01', '0', '20200907'),('03', '0', 
'20200908'),
   insert overwrite table droppartition partition (dtm=20200908) select * from 
droppartition where dtm = 20200907;
   insert overwrite table droppartition partition (dtm=20200909) select * from 
droppartition where dtm = 20200907;
   
   3. alter table droppartition drop partition (dtm=20200909)
   
   the dirctionary "20200908" was deleted.
   The rootcause: drop partition will clean stale data, but delete the parent 
dirctionary contains the stale data, leading to normal data loss.
    
    ### What changes were proposed in this PR?
   Fix this issue by limit to clean stale data, not the whole dirctionary
       
    ### 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:
us...@infra.apache.org


Reply via email to