Skip to content

[FLINK-40187][python] Introduce DataType class in DataFrame API - #28843

Open
auroflow wants to merge 1 commit into
apache:masterfrom
auroflow:auroflow/dataframe-types
Open

[FLINK-40187][python] Introduce DataType class in DataFrame API#28843
auroflow wants to merge 1 commit into
apache:masterfrom
auroflow:auroflow/dataframe-types

Conversation

@auroflow

Copy link
Copy Markdown
Contributor

What is the purpose of the change

This pull request completes the DataType API for the PyFlink DataFrame API. It provides the scalar, temporal, and composite data types required by subsequent DataFrame operations.

Brief change log

  • Add scalar, temporal, and composite DataType factory methods.
  • Add nullability modifiers and a readable representation for DataType.
  • Add internal helpers for inferring data types from Python type hints and parsing SQL type strings.
  • Preserve timestamp precision and support NULL when converting Java data types to Python data types.
  • Extend the DataFrame API reference documentation.
  • Add focused tests for factories, nullability, nested types, type inference, SQL parsing, equality, hashing, and representation.

Verifying this change

This change added tests and can be verified as follows:

  • Ran the complete DataFrame test suite:
    • .venv/bin/python -m pytest -q flink-python/pyflink/dataframe/tests
    • Result: 94 passed
  • Ran flake8 checks for all changed Python files.
  • Compiled all changed Python files with py_compile.
  • Ran mvn -T 12 spotless:check through the pre-push hook.

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 and Python API docstrings

Was generative AI tooling used to co-author this PR?
  • Yes (OpenAI Codex)

Generated-by: OpenAI Codex (GPT-5.6 Sol)

@flinkbot

flinkbot commented Jul 30, 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

@auroflow
auroflow force-pushed the auroflow/dataframe-types branch from f840c98 to ff4525b Compare July 30, 2026 09:22
@auroflow
auroflow force-pushed the auroflow/dataframe-types branch from ff4525b to d8682e9 Compare July 30, 2026 09:55
@auroflow
auroflow marked this pull request as ready for review July 30, 2026 11:29
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