-
Notifications
You must be signed in to change notification settings - Fork 13.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FLINK-21005][table-api] Introduce new provider for unified Sink API and implement in planner #14822
Conversation
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community Automated ChecksLast check on commit 4b0b591 (Fri Feb 19 07:34:06 UTC 2021) Warnings:
Mention the bot in a comment to re-run the automated checks. Review Progress
Please see the Pull Request Review Guide for a full explanation of the review process. The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commandsThe @flinkbot bot supports the following commands:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution.
Could you also add a test for this? You can add the sink provider implementation in org.apache.flink.table.planner.factories.TestFileSourceFactory
. It wraps the FileSource
as a SourceProvider
. I think you can also wrap the FileSink
as a SinkProvider
. And then you can add IT case in org.apache.flink.table.planner.runtime.stream.table.TableSinkITCase
.
...ble/flink-table-common/src/main/java/org/apache/flink/table/connector/sink/SinkProvider.java
Outdated
Show resolved
Hide resolved
...link/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/common/CommonExecSink.java
Outdated
Show resolved
Hide resolved
...link/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/common/CommonExecSink.java
Show resolved
Hide resolved
...link/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/common/CommonExecSink.java
Outdated
Show resolved
Hide resolved
...lanner-blink/src/test/java/org/apache/flink/table/planner/factories/TestFileSinkFactory.java
Outdated
Show resolved
Hide resolved
...ink/src/test/scala/org/apache/flink/table/planner/runtime/stream/table/TableSinkITCase.scala
Outdated
Show resolved
Hide resolved
…and implement in planner
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updating @SteNicholas . It looks in a good shape now. I think we can further refactor the implementaion of createSinkTransformation
, it is quite long and messed. I refactored it to extract the logic of applying not-null-enforcer and keyBy partition. You can see the changes in my commit: wuchong@0894736
...link/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/common/CommonExecSink.java
Show resolved
Hide resolved
...le-planner-blink/src/test/java/org/apache/flink/table/planner/factories/TestFileFactory.java
Outdated
Show resolved
Hide resolved
...ink/src/test/scala/org/apache/flink/table/planner/runtime/stream/table/TableSinkITCase.scala
Outdated
Show resolved
Hide resolved
…and implement in planner
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
What is the purpose of the change
FLIP-143 introduced the unified sink API.
SinkRuntimeProvider
should be added for it and support it in Blink planner. Introduce a new providerSinkProvider
for unified Sink API and implement in planner.Brief change log
SinkProvider
as a runtime implementation forDynamicTableSink
.CommonExecSink
adds theSinkProvider
implement in thecreateSinkTransformation
.Verifying this change
Does this pull request potentially affect one of the following parts:
@Public(Evolving)
: (yes / no)Documentation