Skip to content

Expose the inline Python UDF payload prefixes publicly #1817

Open

Description

@andygrove

Is your feature request related to a problem or challenge?

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 are pub(crate) in crates/core/src/codec.rs:

pub(crate) const PY_SCALAR_UDF_FAMILY: &[u8] = b"DFPYUDF";
pub(crate) const PY_AGG_UDF_FAMILY: &[u8] = b"DFPYUDA";
pub(crate) const PY_WINDOW_UDF_FAMILY: &[u8] = b"DFPYUDW";

So Ballista has to keep its own copies (apache/datafusion-ballista#2619), which will silently break if the wire format changes here.

Describe the solution you'd like

Make these constants pub, or expose a public helper that reports whether a buffer is an inline Python UDF payload (something like the existing payload-detection functions, made public).

Describe alternatives you've considered

Keep copying the constants downstream and track wire-format changes by hand.

Additional context

Downstream use: apache/datafusion-ballista#2619 (comment)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions