[FLINK-40424][table][python] Support windowing TVFs in the DataFrame API - #29070
Open
Timm0 wants to merge 1 commit into
Open
[FLINK-40424][table][python] Support windowing TVFs in the DataFrame API#29070Timm0 wants to merge 1 commit into
Timm0 wants to merge 1 commit into
Conversation
- Add `tumble`/`hop`/`cumulate`/`session` window methods to the PyFlink `DataFrame` API, with time-column resolution and day-time interval handling - Introduce internal `WindowTableFunctionQueryOperation` - Dispatch it through `QueryOperationVisitor` and `QueryOperationDefaultVisitor` and construct it via `OperationTreeBuilder.windowTableFunction` - Convert the operation to a `LogicalTableFunctionScan` programmatically in `QueryOperationConverter` - Add tests: api-java operation test, planner `WindowTableFunctionRelNodeTest`, `QueryOperation` serialization + semantic programs, and PyFlink unit + IT tests - Expose `createTable`/`getOperationTreeBuilder` on the Table API test steps and refactor `_materialize` into `test_case_utils` for stream test cases - Document the window methods in `dataframe.rst`
Timm0
marked this pull request as ready for review
September 2, 2026 12:41
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the purpose of the change
This change adds
tumble,hop,cumulate, andsessionwindow methods to theDataFrameAPI and the internal Table API machinery they need. The window operation is built programmatically as aLogicalTableFunctionScanrather than by generating SQL strings, so the DataFrame layer does not have to track Flink's SQL dialect. No new public Table API is introduced, since all added Table API types are
@Internal.Brief change log
tumble/hop/cumulate/sessionwindow methods to the PyFlinkDataFrameAPI, with time-column resolution and day-time interval handlingWindowTableFunctionQueryOperationQueryOperationVisitorandQueryOperationDefaultVisitorand construct it viaOperationTreeBuilder.windowTableFunctionLogicalTableFunctionScanprogrammatically inQueryOperationConverterWindowTableFunctionRelNodeTest,QueryOperationserialization + semantic programs, and PyFlink unit + IT testscreateTable/getOperationTreeBuilderon the Table API test steps and refactor_materializeintotest_case_utilsfor stream test casesdataframe.rstVerifying this change
WindowTableFunctionRelNodeTestQueryOperationserialization + semantic programsDoes this pull request potentially affect one of the following parts:
@Public(Evolving): yesDocumentation
flink-python/docs/reference/pyflink.dataframe/dataframe.rst+ Python docstringsWas generative AI tooling used to co-author this PR?
Generated-by: Opus 4.8 (1M context)