Github user xuchuanyin commented on the issue:

    https://github.com/apache/carbondata/pull/1812
  
    @Xaprice @chenliang613 @ravipesala @gvramana 
    
    I think the syntax of segment compaction should be similar with that of 
other management on segment.
    Currently in carbondata, we delete segment using syntax:
    ```
    DELETE FROM TABLE CarbonDatabase.CarbonTable WHERE SEGMENT.ID IN (0,5,8)
    ```
    And
    ```
    DELETE FROM TABLE CarbonDatabase.CarbonTable WHERE SEGMENT.STARTTIME BEFORE 
'2017-06-01 12:05:06' 
    ```
    
    So, we can imitate the above syntax and get the followings:
    ```
    ALTER TABLE [db_name.]table_name COMPACT 'MINOR/MAJOR' WHERE SEGMENT.ID IN 
(0,5,8)
    ```
    And
    ```
    ALTER TABLE [db_name.]table_name COMPACT 'MINOR/MAJOR' WHERE 
SEGMENT.STARTTIME BEFORE '2017-06-01 12:05:06' AND SEGMENT.STARTTIME AFTER 
'2017-05-01 12:05:06' 
    ```
    We can support compact segment by specifying IDs and dates.


---

Reply via email to