Re: [DISCUSS] FLIP-300: Add targetColumns to DynamicTableSink#Context to solve the null overwrite problem of partial-insert

2023-03-13 Thread Lincoln Lee
Hi everyone, I started a vote for this FLIP[1], please vote there[2] or ask additional questions here[3]. [1] https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=240885081 [2] https://lists.apache.org/thread/089glskx8ydphnyx8q1v996s8y83xkn6 [3]

Re: [DISCUSS] FLIP-300: Add targetColumns to DynamicTableSink#Context to solve the null overwrite problem of partial-insert

2023-03-10 Thread Lincoln Lee
Hi everyone, If there are no other questions or concerns for the FLIP[1], I'd like to start the vote next Monday(3.13). [1] https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=240885081 Best, Lincoln Lee Jing Ge 于2023年3月10日周五 05:59写道: > Hi Lincoln, > > sounds good to me.

Re: [DISCUSS] FLIP-300: Add targetColumns to DynamicTableSink#Context to solve the null overwrite problem of partial-insert

2023-03-09 Thread Jing Ge
Hi Lincoln, sounds good to me. Thanks! Best, Jing On Wed, Mar 8, 2023 at 2:01 PM Lincoln Lee wrote: > Hi Jing, > Agree with you that using formal terms can be easier to users, I've updated > the FLIP[1], since this is only one of the application scenarios for > partial insert, our java doc

Re: [DISCUSS] FLIP-300: Add targetColumns to DynamicTableSink#Context to solve the null overwrite problem of partial-insert

2023-03-09 Thread Lincoln Lee
Hi Timo, Thank you for the suggestion, I've updated the java doc (to make it clear that a statement without specifying a column list will return {@link Optional#empty()}) in the FLIP[1] and also the poc[2]. [1] https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=240885081 [2]

Re: [DISCUSS] FLIP-300: Add targetColumns to DynamicTableSink#Context to solve the null overwrite problem of partial-insert

2023-03-09 Thread Timo Walther
Hi Lincoln, thanks for proposing the FLIP. The general idea to expose the target columns in DynamicTableSink#Context sounds good to me. In the FLIP I found the JavaDoc a bit confusing: ``` The column list will be empty for 'insert into target select ...'. ``` This could mean both optional

Re: [DISCUSS] FLIP-300: Add targetColumns to DynamicTableSink#Context to solve the null overwrite problem of partial-insert

2023-03-08 Thread Lincoln Lee
Hi Jing, Agree with you that using formal terms can be easier to users, I've updated the FLIP[1], since this is only one of the application scenarios for partial insert, our java doc for the corresponding interface will describe the partial insert message itself from a generic point of view, WDTY?

Re: [DISCUSS] FLIP-300: Add targetColumns to DynamicTableSink#Context to solve the null overwrite problem of partial-insert

2023-03-08 Thread Jacky Lau
Thanks for bringing this up. this is a good feature. but i have two questions: 1. if the two insert into with same columns, the result is not nondeterminism. will it check in planner and throw exception 2. some sink connectors can not supports it like queue such as kafka compacted topic. will

Re: [DISCUSS] FLIP-300: Add targetColumns to DynamicTableSink#Context to solve the null overwrite problem of partial-insert

2023-03-07 Thread Jing Ge
Hi Lincoln, This FLIP is already in a good shape. +1. Thanks for driving it. I just have a very tiny comment, e.g. NIT. The "wide table" you mentioned in the FLIP should be "denormalized table"[1] and fact tables in data warehouse are commonly denormalized tables[2]. As far as I am concerned,

Re: [DISCUSS] FLIP-300: Add targetColumns to DynamicTableSink#Context to solve the null overwrite problem of partial-insert

2023-03-07 Thread Lincoln Lee
Hi all, Both the FLIP[1] and the poc[2] has been updated, using Optional to replace the return value of `getTargetColumns` [1] https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=240885081 [2] https://github.com/apache/flink/pull/22041 Best, Lincoln Lee Jane Chan 于2023年3月7日周二

Re: [DISCUSS] FLIP-300: Add targetColumns to DynamicTableSink#Context to solve the null overwrite problem of partial-insert

2023-03-07 Thread Jane Chan
Hi Lincoln, Thanks for bringing this to the discussion. +1 for the FLIP. Best, Jane On Tue, Mar 7, 2023 at 3:23 PM Aitozi wrote: > > we can initiate corresponding support issues for > specific connectors to follow up on support after finalizing the API > changes > > Make sense to me! > >

Re: [DISCUSS] FLIP-300: Add targetColumns to DynamicTableSink#Context to solve the null overwrite problem of partial-insert

2023-03-06 Thread Aitozi
> we can initiate corresponding support issues for specific connectors to follow up on support after finalizing the API changes Make sense to me! Best, Aitozi. Lincoln Lee 于2023年3月7日周二 15:05写道: > Thanks Jingsong & Hang, > > Using Optional as the return value is a good idea. Previously, I >

Re: [DISCUSS] FLIP-300: Add targetColumns to DynamicTableSink#Context to solve the null overwrite problem of partial-insert

2023-03-06 Thread Lincoln Lee
Thanks Jingsong & Hang, Using Optional as the return value is a good idea. Previously, I hoped to keep the style of the LookupTableSource.LookupContext#getKeys as consistent as possible, but the getKeys is actually non-empty when used, so I support updating to Optional. I'll update the flip doc

Re: [DISCUSS] FLIP-300: Add targetColumns to DynamicTableSink#Context to solve the null overwrite problem of partial-insert

2023-03-06 Thread Lincoln Lee
Hi Aitozi, Thanks for your feedback! Yes, including HBase and JDBC connector, they can be considered for support in the next step (JDBC as as a standard protocol supported not only in traditional databases, but also in more and more new types of storage). Considering the ongoing externalizing of

Re: [DISCUSS] FLIP-300: Add targetColumns to DynamicTableSink#Context to solve the null overwrite problem of partial-insert

2023-03-06 Thread Hang Ruan
Hi, Lincoln, Thanks for bringing this up. It looks good to me. I also agree with Jingsong's suggestion. Best, Hang Jingsong Li 于2023年3月7日周二 11:15写道: > Wow, we have 300 FLIPs... > > Thanks Lincoln, > > Have you considered returning an Optional? > > Empty array looks a little weird to me. > >

Re: [DISCUSS] FLIP-300: Add targetColumns to DynamicTableSink#Context to solve the null overwrite problem of partial-insert

2023-03-06 Thread Jingsong Li
Wow, we have 300 FLIPs... Thanks Lincoln, Have you considered returning an Optional? Empty array looks a little weird to me. Best, Jingsong On Tue, Mar 7, 2023 at 10:32 AM Aitozi wrote: > > Hi Lincoln, > Thank you for sharing this FLIP. Overall, it looks good to me. I have > one

Re: [DISCUSS] FLIP-300: Add targetColumns to DynamicTableSink#Context to solve the null overwrite problem of partial-insert

2023-03-06 Thread Aitozi
Hi Lincoln, Thank you for sharing this FLIP. Overall, it looks good to me. I have one question: with the introduction of this interface, will any existing Flink connectors need to be updated in order to take advantage of its capabilities? For example, HBase. yuxia 于2023年3月7日周二 10:01写道: >

Re: [DISCUSS] FLIP-300: Add targetColumns to DynamicTableSink#Context to solve the null overwrite problem of partial-insert

2023-03-06 Thread yuxia
Thanks. It makes sense to me. Best regards, Yuxia - 原始邮件 - 发件人: "Lincoln Lee" 收件人: "dev" 发送时间: 星期一, 2023年 3 月 06日 下午 10:26:26 主题: Re: [DISCUSS] FLIP-300: Add targetColumns to DynamicTableSink#Context to solve the null overwrite problem of partial-insert hi yuxia, Thanks for your

Re: [DISCUSS] FLIP-300: Add targetColumns to DynamicTableSink#Context to solve the null overwrite problem of partial-insert

2023-03-06 Thread Lincoln Lee
hi yuxia, Thanks for your feedback and tracking the issue of update statement! I've updated the FLIP[1] and also the poc[2]. Since the bug and flip are orthogonal, we can focus on finalizing the api changes first, and then work on the flip implementation and bugfix separately, WDYT? [1]

Re: [DISCUSS] FLIP-300: Add targetColumns to DynamicTableSink#Context to solve the null overwrite problem of partial-insert

2023-03-06 Thread yuxia
Hi, Lincoln. Thanks for bringing this up. +1 for this FLIP, it's helpful for external storage system to implement partial update. The FLIP looks good to me. I only want to add one comment, update statement also doesn't support updating nested column, I have created FLINK-31344[1] to track it.

[DISCUSS] FLIP-300: Add targetColumns to DynamicTableSink#Context to solve the null overwrite problem of partial-insert

2023-03-02 Thread Lincoln Lee
Hi everyone, This FLIP[1] aims to support connectors in avoiding overwriting non-target columns with null values when processing partial column updates, we propose adding information on the target column list to DynamicTableSink#Context. FLINK-18726[2] supports inserting statements with