Login  Register

Re: Change for DELETE SEGMENT FROM TABLE syntax

Posted by ravipesala on Sep 23, 2016; 4:55pm
URL: http://apache-carbondata-dev-mailing-list-archive.168.s1.nabble.com/Change-for-DELETE-SEGMENT-FROM-TABLE-syntax-tp1375p1418.html

Hi Jay,

Here if you use carbonsqlparser first then it won't be any issue. But if
you use hive parser first then this issue arises. But I think there is a
same case even with the 'Load' command, how that is handled here.

And also the delete commands you mentioned does not look proper.
 DELETE FROM TABLE WHERE SEGMENT EQUAL id
 DELETE FROM TABLE WHERE SEGMENTS STARTTIME BEFORE date
Here it seems like SEGMENT and SEGMENTS are like columns in table. I prefer
the old DELETE commands over new commands.


Thanks & Regards,
Ravindra.

On 23 September 2016 at 12:19, 杰 <[hidden email]> wrote:

> 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




--
Thanks & Regards,
Ravi