[DISCUSSION] implement MERGE INTO statement

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[DISCUSSION] implement MERGE INTO statement

David Cai
hi all,
    CarbonData has supported the insert/update/delete operations.
    Now we can start to discuss the MERGE INTO statement.
    It should combine insert, update and delete operations into a single statement, and it will be executed atomically.
   
SQL maybe like :
     MERGE INTO target_table
     USING source_table
     ON merge_condition
     WHEN MATCHED [ AND condition] THEN
         UPDATE | DELETE ...
     WHEN NOT MATCHED [ AND condition]  THEN
         INSERT ...

    Any question and suggestion are welcome.

Regards
David QiangCai
Reply | Threaded
Open this post in threaded view
|

Unsubscribeme

J 12323123
On Sat, 31 Aug 2019, 18:14 David Cai, <[hidden email]> wrote:

> hi all,
>     CarbonData has supported the insert/update/delete operations.
>     Now we can start to discuss the MERGE INTO statement.
>     It should combine insert, update and delete operations into a single
> statement, and it will be executed atomically.
>
> SQL maybe like :
>      MERGE INTO target_table
>      USING source_table
>      ON merge_condition
>      WHEN MATCHED [ AND condition] THEN
>          UPDATE | DELETE ...
>      WHEN NOT MATCHED [ AND condition]  THEN
>          INSERT ...
>
>     Any question and suggestion are welcome.
>
> Regards
> David QiangCai
>
Reply | Threaded
Open this post in threaded view
|

Re: [DISCUSSION] implement MERGE INTO statement

ravipesala
In reply to this post by David Cai
Hi David,

+1

It is better to follow the hive syntax rather than having our own. Please
check it
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DML#LanguageManualDML-Merge

And also it is better to have design document explaining the changes to be
done on current IUD.

Regards,
Ravindra.

On Sat, 31 Aug 2019 at 11:44 AM, David Cai <[hidden email]> wrote:

> hi all,
>     CarbonData has supported the insert/update/delete operations.
>     Now we can start to discuss the MERGE INTO statement.
>     It should combine insert, update and delete operations into a single
> statement, and it will be executed atomically.
>
> SQL maybe like :
>      MERGE INTO target_table
>      USING source_table
>      ON merge_condition
>      WHEN MATCHED [ AND condition] THEN
>          UPDATE | DELETE ...
>      WHEN NOT MATCHED [ AND condition]  THEN
>          INSERT ...
>
>     Any question and suggestion are welcome.
>
> Regards
> David QiangCai
>
--
Thanks & Regards,
Ravi
Reply | Threaded
Open this post in threaded view
|

Re: [DISCUSSION] implement MERGE INTO statement

kumarvishal09
+1
Regards
Kumar Vishal

On Sat, 31 Aug 2019 at 14:42, Ravindra Pesala <[hidden email]> wrote:

> Hi David,
>
> +1
>
> It is better to follow the hive syntax rather than having our own. Please
> check it
>
> https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DML#LanguageManualDML-Merge
>
> And also it is better to have design document explaining the changes to be
> done on current IUD.
>
> Regards,
> Ravindra.
>
> On Sat, 31 Aug 2019 at 11:44 AM, David Cai <[hidden email]> wrote:
>
> > hi all,
> >     CarbonData has supported the insert/update/delete operations.
> >     Now we can start to discuss the MERGE INTO statement.
> >     It should combine insert, update and delete operations into a single
> > statement, and it will be executed atomically.
> >
> > SQL maybe like :
> >      MERGE INTO target_table
> >      USING source_table
> >      ON merge_condition
> >      WHEN MATCHED [ AND condition] THEN
> >          UPDATE | DELETE ...
> >      WHEN NOT MATCHED [ AND condition]  THEN
> >          INSERT ...
> >
> >     Any question and suggestion are welcome.
> >
> > Regards
> > David QiangCai
> >
> --
> Thanks & Regards,
> Ravi
>
kumar vishal
Reply | Threaded
Open this post in threaded view
|

Re: [DISCUSSION] implement MERGE INTO statement

akashnilugal@gmail.com
In reply to this post by David Cai
Hi David,
Can you please create a JIRA and upload a design document.

Regards,
Akash

On 2019/08/31 06:14:45, David Cai <[hidden email]> wrote:

> hi all,
>     CarbonData has supported the insert/update/delete operations.
>     Now we can start to discuss the MERGE INTO statement.
>     It should combine insert, update and delete operations into a single statement, and it will be executed atomically.
>    
> SQL maybe like :
>      MERGE INTO target_table
>      USING source_table
>      ON merge_condition
>      WHEN MATCHED [ AND condition] THEN
>          UPDATE | DELETE ...
>      WHEN NOT MATCHED [ AND condition]  THEN
>          INSERT ...
>
>     Any question and suggestion are welcome.
>
> Regards
> David QiangCai
>
Reply | Threaded
Open this post in threaded view
|

Re: [DISCUSSION] implement MERGE INTO statement

xm_zzc
In reply to this post by ravipesala
+1


Zhichao Zhang




------------------ Original ------------------
From: "ravipesala [via Apache CarbonData Dev Mailing List archive]"<[hidden email]>;
Date: Sat, Aug 31, 2019 05:16 PM
To: "恩爸"<[hidden email]>;

Subject: Re: [DISCUSSION] implement MERGE INTO statement



  Hi David,

+1

It is better to follow the hive syntax rather than having our own. Please
check it
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DML#LanguageManualDML-Merge

And also it is better to have design document explaining the changes to be
done on current IUD.

Regards,
Ravindra.

On Sat, 31 Aug 2019 at 11:44 AM, David Cai <[hidden email]> wrote:

> hi all,
>     CarbonData has supported the insert/update/delete operations.
>     Now we can start to discuss the MERGE INTO statement.
>     It should combine insert, update and delete operations into a single
> statement, and it will be executed atomically.
>
> SQL maybe like :
>      MERGE INTO target_table
>      USING source_table
>      ON merge_condition
>      WHEN MATCHED [ AND condition] THEN
>          UPDATE | DELETE ...
>      WHEN NOT MATCHED [ AND condition]  THEN
>          INSERT ...
>
>     Any question and suggestion are welcome.
>
> Regards
> David QiangCai
>
--  
Thanks & Regards,
Ravi
 
 
 
  If you reply to this email, your message will be added to the discussion below:
  http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/DISCUSSION-implement-MERGE-INTO-statement-tp83941p83948.html 
  To start a new topic under Apache CarbonData Dev Mailing List archive, email [hidden email]
  To unsubscribe from Apache CarbonData Dev Mailing List archive, click here.
  NAML
Reply | Threaded
Open this post in threaded view
|

Re: [DISCUSSION] implement MERGE INTO statement

xuchuanyin
In reply to this post by David Cai
+1 with ravipesala, please use corresponding hive grammar and take delta
grammar as reference.



--
Sent from: http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: [DISCUSSION] implement MERGE INTO statement

ravipesala
Hi All,

I have implemented merge syntax.
Related jira : https://issues.apache.org/jira/browse/CARBONDATA-3597
PR : https://github.com/apache/carbondata/pull/3483

Please review it.

Regards,
Ravindra.



--
Sent from: http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/