Skip to content

feat: make Python UDF wire-format family prefixes public - #1818

Open
ump45nose wants to merge 1 commit into
apache:mainfrom
ump45nose:fix/1817-pub-udf-family-prefixes
Open

ump45nose wants to merge 1 commit into
apache:mainfrom
ump45nose:fix/1817-pub-udf-family-prefixes

Conversation

@ump45nose

Copy link
Copy Markdown

Which issue does this PR close?

Closes #1817.

Rationale for this change

Ballista's Python client wraps datafusion-python's PythonLogicalCodec and needs to recognise inline Python UDF payloads so it can route them to that codec. The family prefixes it matches on were pub(crate) in crates/core/src/codec.rs, so Ballista had to keep its own copies and would silently break if the wire format changed here.

What changes are included in this PR?

  • Change PY_SCALAR_UDF_FAMILY, PY_AGG_UDF_FAMILY, and PY_WINDOW_UDF_FAMILY from pub(crate) to pub.
  • Document that these constants are the public wire-format family registry for downstream consumers.

They are reachable as datafusion_python::codec::PY_*_UDF_FAMILY (pub mod codec was already public). No other pub(crate) wire-format constants (WIRE_VERSION_*, CHAINED_*, etc.) are exposed.

Are there any user-facing changes?

Yes — additive Rust API only. Downstream crates can import the three family prefixes instead of duplicating the magic bytes. No Python API change and no behaviour change.

AI assistance

AI-assisted implementation (agent harness); change reviewed for minimality against #1817.

Tests

  • cargo check -p datafusion-python (pass)
  • cargo fmt -p datafusion-python -- --check (pass; only unstable rustfmt.toml warnings unrelated to this change)

Expose PY_SCALAR_UDF_FAMILY, PY_AGG_UDF_FAMILY, and PY_WINDOW_UDF_FAMILY
so downstream consumers (e.g. Ballista's Python client) can recognise
inline Python UDF payloads without duplicating the magic bytes.

Closes apache#1817.
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.

Expose the inline Python UDF payload prefixes publicly

1 participant