Skip to content

[FLINK-39904][python] Add PyFlink GEOGRAPHY support - #28833

Draft
davidchaava wants to merge 15 commits into
apache:masterfrom
akvelon:task/support-pyflink
Draft

[FLINK-39904][python] Add PyFlink GEOGRAPHY support#28833
davidchaava wants to merge 15 commits into
apache:masterfrom
akvelon:task/support-pyflink

Conversation

@davidchaava

@davidchaava davidchaava commented Jul 28, 2026

Copy link
Copy Markdown

What is the purpose of the change

This PR adds PyFlink support for the GEOGRAPHY logical type.

It exposes GEOGRAPHY in PyFlink table schemas, Python type conversion, Arrow conversion, Python function execution protocol, and SQL round-trip paths. This allows Python users to define GEOGRAPHY columns, pass GEOGRAPHY values through PyFlink APIs, and round-trip GEOGRAPHY values as WKB bytes where needed.

This PR is stacked on the base GEOGRAPHY type support and SQL ST functions work.

Brief change log

  • Add PyFlink DataTypes.GEOGRAPHY() support.
  • Add GEOGRAPHY handling in PyFlink table schema/type conversion.
  • Add GEOGRAPHY support to Python function execution coders and protocol.
  • Add GEOGRAPHY support in Java/Python bridge conversion utilities.
  • Add Arrow conversion support for GEOGRAPHY values.
  • Add PyFlink tests for schema, SQL, type conversion, and WKB round-trip behavior.

Dependencies

This PR is stacked on top of:

Only the PyFlink-specific changes should be reviewed here. Earlier GEOGRAPHY logical type and SQL function changes are included only because this is a stacked branch.

Related changes

This PR depends on the core GEOGRAPHY logical type support from apache/flink#28740.

It also depends on the SQL ST functions from apache/flink#28788, which provide user-facing SQL constructors and accessors such as ST_GEOGFROMTEXT, ST_GEOGFROMWKB, ST_ASTEXT, and ST_ASWKB.

Verifying this change

This change is covered by PyFlink and Java/Python bridge tests.

The added coverage includes:

  • PyFlink schema support for GEOGRAPHY.
  • PyFlink SQL usage with GEOGRAPHY constructors and accessors.
  • Python function execution protocol support for GEOGRAPHY.
  • WKB bytes round-trip behavior.
  • Arrow conversion support for GEOGRAPHY values.

Does this pull request potentially affect one of the following parts

  • Dependencies: no
  • The public API: yes, PyFlink exposes GEOGRAPHY type support
  • The serializers: no
  • The runtime per-record code paths: yes, Python/Arrow conversion paths for GEOGRAPHY
  • Anything that affects deployment or recovery: no
  • The S3 file system connector: no

Documentation

This PR does not add end-user documentation. It extends PyFlink support for the GEOGRAPHY type introduced by the related GEOGRAPHY PRs.

@flinkbot

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

@davidchaava
davidchaava force-pushed the task/support-pyflink branch from 7fbbb09 to 5ce335d Compare July 28, 2026 20:36
@davidchaava
davidchaava force-pushed the task/support-pyflink branch from 16ec8c0 to ba8062c Compare July 29, 2026 07:30
@davidchaava
davidchaava force-pushed the task/support-pyflink branch from ba8062c to bb94693 Compare July 29, 2026 08:45
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.

3 participants