Re: Re: [DISCUSS] FLIP-305: Support atomic for CREATE TABLE AS SELECT(CTAS) statement

2023-06-09 Thread liu ron
gt; > >> >>>> > >> >>>> > >> >>>> > >> >>>> > >> >>>> -- > >> >>>> > >> >>>> Best regards, > >> >>>> Mang Zhang > >&

Re:Re: [DISCUSS] FLIP-305: Support atomic for CREATE TABLE AS SELECT(CTAS) statement

2023-06-08 Thread Mang Zhang
>>>> Hi, Mang >> >>>>> >> >>>>> I have a question about the implementation details. For the >> atomicity case, >> >>>>> since the target table is not created before the JobGraph is >> generated, but >> >

Re: [DISCUSS] FLIP-305: Support atomic for CREATE TABLE AS SELECT(CTAS) statement

2023-06-08 Thread liu ron
get table is required to exist when optimizing plan to > generate > >>>>> the JobGraph. So how do you solve this problem? > >>>>> > >>>>> Best, > >>>>> Ron > >>>>> > >>>>>

Re: [DISCUSS] FLIP-305: Support atomic for CREATE TABLE AS SELECT(CTAS) statement

2023-06-08 Thread Jark Wu
t; >>>>>> >>>>>> -- >>>>>> Best regards, >>>>>> Mang Zhang >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> At 2023-04-15 04:20:40, "Jing Ge&

Re: Re: Re: [DISCUSS] FLIP-305: Support atomic for CREATE TABLE AS SELECT(CTAS) statement

2023-06-07 Thread Jingsong Li
;> The main or important reason is that the TwoPhaseCatalogTable enables > >> >> external connectors to implement theirs own logic for commit / abort. > >> >> In FLIP-218, for atomic CTAS, the Catalog will then just drop the table > >> >>

Re:Re: Re: [DISCUSS] FLIP-305: Support atomic for CREATE TABLE AS SELECT(CTAS) statement

2023-06-06 Thread Mang Zhang
it's too generic to work well. >> >> For example, some connectors will need to clean some temporary files in >> >> abort method. And the actual connector can know the specific logic for >> >> aborting. >> >> >> >> Best regards, >> >&

Re:Re: Re: [DISCUSS] FLIP-305: Support atomic for CREATE TABLE AS SELECT(CTAS) statement

2023-05-14 Thread Mang Zhang
the table >> >> when the job fail. It's not ideal for it's too generic to work well. >> >> For example, some connectors will need to clean some temporary files in >> >> abort method. And the actual connector can know the specific logic for >> >

Re: Re: [DISCUSS] FLIP-305: Support atomic for CREATE TABLE AS SELECT(CTAS) statement

2023-05-11 Thread Jingsong Li
re quite different - > >> >atomic vs. non-atomic. Another question is, before we call > >> >Catalog#twoPhaseCreateTable(...), we have to know the value of > >> >isStreamingMode. In case only non-atomic is supported for streaming mode, > >> >we could just fol

Re:Re: [DISCUSS] FLIP-305: Support atomic for CREATE TABLE AS SELECT(CTAS) statement

2023-05-10 Thread Mang Zhang
t;zhangmang1" >> 收件人: "dev" , "Jing Ge" >> 抄送: "ron9 liu" , "lincoln 86xy" < >> lincoln.8...@gmail.com>, luoyu...@alumni.sjtu.edu.cn >> 发送时间: 星期三, 2023年 4 月 19日 下午 3:13:36 >> 主题: Re:Re: [DISCUSS] FLIP-305: Support ato

Re:Re: Re: Re: [DISCUSS] FLIP-305: Support atomic for CREATE TABLE AS SELECT(CTAS) statement

2023-05-10 Thread Mang Zhang
mes there will be no difference >> >> >by >> >> >using true/false isStreamingMode, sometimes they are quite different - >> >> >atomic vs. non-atomic. Another question is, before we call >> >> >Catalog#twoPhaseCreateTable(...), we have to

Re: Re: Re: [DISCUSS] FLIP-305: Support atomic for CREATE TABLE AS SELECT(CTAS) statement

2023-04-28 Thread Jing Ge
non-atomic is supported for streaming mode, > >> >we could just follow FLIP-218 instead of (twistedly) calling > >> >Catalog#twoPhaseCreateTable(...) with a false isStreamingMode. Did I miss > >> >anything here? > >> > > >

Re:Re: Re: [DISCUSS] FLIP-305: Support atomic for CREATE TABLE AS SELECT(CTAS) statement

2023-04-25 Thread Mang Zhang
t;> > >> >On Fri, Apr 14, 2023 at 1:55 PM yuxia wrote: >> > >> >> Hi, Mang. >> >> +1 for completing the support for atomicity of CTAS, this is very useful >> >> in batch scenarios and integrate with the data lake which support >>

Re: Re: [DISCUSS] FLIP-305: Support atomic for CREATE TABLE AS SELECT(CTAS) statement

2023-04-24 Thread Jing Ge
t;> I just have one question, IIUC, the DynamiacTableSink will need to know > >> it's for normal case or the atomicity with CTAS as well as neccessary > >> context. > >> Take jdbc catalog as an example, if it's CTAS with atomicity supports, the > >

Re: [DISCUSS] FLIP-305: Support atomic for CREATE TABLE AS SELECT(CTAS) statement

2023-04-23 Thread liu ron
c for > aborting. > > Best regards, > Yuxia > > > 发件人: "zhangmang1" > 收件人: "dev" , "Jing Ge" > 抄送: "ron9 liu" , "lincoln 86xy" < > lincoln.8...@gmail.com>, luoyu...@alumni.sjtu.edu.cn > 发送时间: 星期三, 2023年 4

Re: [DISCUSS] FLIP-305: Support atomic for CREATE TABLE AS SELECT(CTAS) statement

2023-04-19 Thread yuxia
g1" 收件人: "dev" , "Jing Ge" 抄送: "ron9 liu" , "lincoln 86xy" , luoyu...@alumni.sjtu.edu.cn 发送时间: 星期三, 2023年 4 月 19日 下午 3:13:36 主题: Re:Re: [DISCUSS] FLIP-305: Support atomic for CREATE TABLE AS SELECT(CTAS) statement hi, Jing Thank you for your r

Re:Re: [DISCUSS] FLIP-305: Support atomic for CREATE TABLE AS SELECT(CTAS) statement

2023-04-19 Thread Mang Zhang
ble defined in the >> TwoPhaseCatalogTable which is different from normal case. >> >> How can the DynamiacTableSink can get it? Could you give some explanation >> or example in this FLIP? >> >> >> Best regards, >> Yuxia >> >> - 原始邮件

Re:Re: [DISCUSS] FLIP-305: Support atomic for CREATE TABLE AS SELECT(CTAS) statement

2023-04-18 Thread Mang Zhang
t;example in this FLIP? > > >Best regards, >Yuxia > >- 原始邮件 - >发件人: "zhangmang1" >收件人: "dev" , "ron9 liu" , "lincoln >86xy" >发送时间: 星期五, 2023年 4 月 14日 下午 2:50:40 >主题: Re:Re: [DISCUSS] FLIP-305: Support atomic for CRE

Re: [DISCUSS] FLIP-305: Support atomic for CREATE TABLE AS SELECT(CTAS) statement

2023-04-14 Thread Jing Ge
or example in this FLIP? > > > Best regards, > Yuxia > > - 原始邮件 - > 发件人: "zhangmang1" > 收件人: "dev" , "ron9 liu" , > "lincoln 86xy" > 发送时间: 星期五, 2023年 4 月 14日 下午 2:50:40 > 主题: Re:Re: [DISCUSS] FLIP-305: Support atomic for

Re: [DISCUSS] FLIP-305: Support atomic for CREATE TABLE AS SELECT(CTAS) statement

2023-04-14 Thread yuxia
anation or example in this FLIP? Best regards, Yuxia - 原始邮件 - 发件人: "zhangmang1" 收件人: "dev" , "ron9 liu" , "lincoln 86xy" 发送时间: 星期五, 2023年 4 月 14日 下午 2:50:40 主题: Re:Re: [DISCUSS] FLIP-305: Support atomic for CREATE TABLE AS SELECT(CTAS) statement

Re:Re: [DISCUSS] FLIP-305: Support atomic for CREATE TABLE AS SELECT(CTAS) statement

2023-04-13 Thread Mang Zhang
Hi, Lincoln and Ron Thank you for your reply. On the naming wise I think OK, the future expansion of new features more uniform. I have updated the FLIP. About Hive support atomicity CTAS, Hive is rich in usage scenarios and can be divided into three scenarios: 1. writing Hive tables 2. writin

Re: [DISCUSS] FLIP-305: Support atomic for CREATE TABLE AS SELECT(CTAS) statement

2023-04-12 Thread Lincoln Lee
Hi, Mang +1 for completing the support for atomicity of CTAS, this is very useful in batch scenarios. I have two questions: 1. naming wise: a) can we rename the `Catalog#getTwoPhaseCommitCreateTable` to `Catalog#twoPhaseCreateTable` (and we may add twoPhaseReplaceTable/twoPhaseCreateOrReplaceTa

Re: [DISCUSS] FLIP-305: Support atomic for CREATE TABLE AS SELECT(CTAS) statement

2023-04-12 Thread liu ron
Hi, Mang Atomicity is very important for CTAS, especially for batch jobs. This FLIP is a continuation of FLIP-218, which is valuable for CTAS. I just have one question, in the Motivation part of FLIP-218, we mentioned three levels of atomicity semantics, can this current design do the same as Spark

[DISCUSS] FLIP-305: Support atomic for CREATE TABLE AS SELECT(CTAS) statement

2023-04-09 Thread Mang Zhang
Hi, everyone I'd like to start a discussion about FLIP-305: Support atomic for CREATE TABLE AS SELECT(CTAS) statement [1]. CREATE TABLE AS SELECT(CTAS) statement has been support, but it's not atomic. It will create the table first before job running. If the job execution fails, or is ca