Skip to content

[FLINK-40190][python] Add PyFlink DataFrame creation and conversion APIs - #28934

Draft
auroflow wants to merge 5 commits into
apache:masterfrom
auroflow:codex/flink-40190-dataframe-conversion
Draft

[FLINK-40190][python] Add PyFlink DataFrame creation and conversion APIs#28934
auroflow wants to merge 5 commits into
apache:masterfrom
auroflow:codex/flink-40190-dataframe-conversion

Conversation

@auroflow

@auroflow auroflow commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

What is the purpose of the change

This pull request completes the data creation and conversion APIs for the PyFlink DataFrame API described in FLINK-40190.

It adds creation from pandas DataFrames, PyArrow tables, PyFlink Tables, dictionaries, records, and integer ranges. It also supports conversion back to Table and pandas, explicit column names, and event-time watermarks where applicable.

Brief change log

  • Add from_pandas(), from_arrow(), from_table(), and range(), and complete the existing from_dict() and from_records() creators.
  • Add DataFrame.to_table() and DataFrame.to_pandas().

Verifying this change

This change added tests and can be verified as follows:

  • Added plain unit tests for schema and watermark validation, record normalization, range behavior, Arrow batch splitting, and empty Arrow streams.
  • Added planner-backed tests for pandas and Arrow schema inference, positional renaming, typed empty inputs, watermark metadata, and Table identity.
  • Added wrapper tests for to_table() and to_pandas().
  • Added an integration smoke test covering from_arrow() → DataFrame transformation → to_pandas().

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: yes — Python in-memory and Arrow source serialization only; no state or persisted serialization format changes
  • 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? PyDocs and public API docstrings

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

Generated-by: Codex (GPT-5)

Add pandas, Arrow, Table, and range creators with strict schema and watermark validation. Add DataFrame conversion wrappers and schema-aware in-memory and Arrow source paths.

Generated-by: Codex (GPT-5)
Align timezone-aware Arrow timestamps with existing Table API semantics, delegate pandas creation to the Arrow path, and add split-aware Arrow IPC serialization. Refine watermark and row helpers with focused tests.

Generated-by: Codex (GPT-5)
Combine inferred-schema row conversion with DataFrame creation and let range use its known BIGINT schema directly.

Generated-by: Codex (GPT-5)
@flinkbot

flinkbot commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

CI report:

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

Reject ranges whose emitted values exceed signed BIGINT bounds before creating the underlying table. Cover valid boundary values and ascending and descending overflow cases.

Generated-by: Codex (GPT-5)
@auroflow
auroflow force-pushed the codex/flink-40190-dataframe-conversion branch from f53446b to 654b9ca Compare August 6, 2026 09:40
Clarify that to_table does not execute a job, remove redundant result-page prose, and exercise from_pandas in the existing pandas round-trip integration smoke test.

Generated-by: Codex (GPT-5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants