Skip to content

[FLINK-39479][python] Add fromChangelog() to Python Table API#27975

Merged
twalthr merged 2 commits intoapache:masterfrom
raminqaf:FLINK-39479
Apr 21, 2026
Merged

[FLINK-39479][python] Add fromChangelog() to Python Table API#27975
twalthr merged 2 commits intoapache:masterfrom
raminqaf:FLINK-39479

Conversation

@raminqaf
Copy link
Copy Markdown
Contributor

@raminqaf raminqaf commented Apr 20, 2026

What is the purpose of the change

The Python Table API is missing the Table.fromChangelog() method introduced with the changelog PTFs (FLIP-564).

Brief change log

  - Add from_changelog() to pyflink/table/table.py
  - Remove fromChangelog from completeness test exclusions

Verifying this change

  • Completeness check for python doesn't fail anymore

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): (yes)
  • 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? (docs / comments)

Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

@flinkbot
Copy link
Copy Markdown
Collaborator

flinkbot commented Apr 20, 2026

CI report:

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

Comment thread flink-python/pyflink/table/table.py
"""
return Table(self._j_table.toChangelog(to_expression_jarray(arguments)), self._t_env)

def from_changelog(self, *arguments: Expression) -> 'Table':
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Currently, both the from_changelog and to_changelog lack corresponding Python side tests, and have even been enlarged to include insert_into and print_explain in the entire table.py. I think we can create a Jira to fill in this part of the testing.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Make sense. Overall Python is only forwarding to Java, so we did not always adds tests for the conversion. If the file syntactically compiles there is a high chance that also a test should pass.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@Au-Miner Thanks for pointing this out. Added a new ticket so we can track this: https://issues.apache.org/jira/browse/FLINK-39505

@github-actions github-actions Bot added the community-reviewed PR has been reviewed by the community. label Apr 20, 2026
Comment thread flink-python/pyflink/table/table.py Outdated
Copy link
Copy Markdown
Contributor

@gustavodemorais gustavodemorais left a comment

Choose a reason for hiding this comment

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

Thanks for addressing the feedback, @raminqaf. LGTM

@twalthr twalthr merged commit 9edb0f5 into apache:master Apr 21, 2026
twalthr pushed a commit that referenced this pull request Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-reviewed PR has been reviewed by the community.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants