Skip to content
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-37541][table-planner] Deprecate getTargetColumns in DynamicTableSink.Context #26381

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

xiangyuf
Copy link
Contributor

@xiangyuf xiangyuf commented Apr 1, 2025

What is the purpose of the change

Deprecate getTargetColumns in DynamicTableSink.Context.

See more in FLIP design https://cwiki.apache.org/confluence/display/FLINK/FLIP-506%3A+Support+Reuse+Multiple+Table+Sinks+in+Planner and discussion thread https://lists.apache.org/thread/r1wo9sf3d1725fhwzrttvv56k4rc782m


Brief change log

  • Deprecate getTargetColumns in DynamicTableSink.Context

Verifying this change

This change is covered by tests, such as (please describe tests).

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): no
  • The public API, i.e., is any changed class annotated with @Public(Evolving): no
  • The serializers: no
  • The runtime per-record code paths (performance sensitive): no
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
  • The S3 file system connector: no

Documentation

  • Does this pull request introduce a new feature? yes
  • If yes, how is the feature documented? FLIP-506

@flinkbot
Copy link
Collaborator

flinkbot commented Apr 1, 2025

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

@davidradl
Copy link
Contributor

This is no detail in the PR or Jira as to why you would like this method deprecated. Please could you add more detail as to why you would like this changed.

*/
@Deprecated(since = "2.1")
Optional<int[][]> getTargetColumns();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a case to want to see the target columns but not write to them? In which case we could keep this method?

@xiangyuf
Copy link
Contributor Author

xiangyuf commented Apr 3, 2025

This is no detail in the PR or Jira as to why you would like this method deprecated. Please could you add more detail as to why you would like this changed.

Hi @davidradl, the reason why I need to deprecate this method is documented in the FLIP design: https://cwiki.apache.org/confluence/display/FLINK/FLIP-506%3A+Support+Reuse+Multiple+Table+Sinks+in+Planner and discussion thread: https://lists.apache.org/thread/r1wo9sf3d1725fhwzrttvv56k4rc782m. In short, by deprecating target columns in context, we can safely reuse sinks even with different target columns if they haven't implemented the SupportsTargetColumnWriting interface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants