Login  Register

Change for DELETE SEGMENT FROM TABLE syntax

Posted by on Sep 23, 2016; 6:49am
URL: http://apache-carbondata-dev-mailing-list-archive.168.s1.nabble.com/Change-for-DELETE-SEGMENT-FROM-TABLE-syntax-tp1375.html

Hi,all
   as we know, carbon have below DELETE  syntax,
   
   DELETE SEGMENT id FROM TABLE
   DELETE SEGMENTS FROM TABLE WHERE STARTTIME BEFORE date
   
   while in hive, there is similar syntax as below,


    DELETE FILE | JAR | ARCHIVE <filepath>


   then, when we run DELETE SEGMENT  in spark-sql that integrating hive parser and carbon parser, it may give below
  error message cause the parse in hive


  ERROR DeleteResourceProcessor: Usage: delete [FILE|JAR|ARCHIVE]  <value> [<value>]*
 
  which does not impact the usage of carbon, but looks not good.
  So after a small discussion, we think that it may be better to make change on our syntax and change to
 
 DELETE FROM TABLE WHERE SEGMENT EQUAL id
 DELETE FROM TABLE WHERE SEGMENTS STARTTIME BEFORE date


  i have raised JIRA[CARBONDATA-269] and  PR#192 for this issue, please give your suggestion about this change.
 


Thanks
Jay