Repository navigation
feat: add ComposedLogicalExtensionCodec - #2752
Merged
Merged
Conversation
The logical counterpart of DataFusion's ComposedPhysicalExtensionCodec: tries each codec in turn, records the position of the one that encoded a payload, and decodes it only with the codec at that position, so a codec is never offered another codec's bytes. Unlike the physical one, a codec that succeeds without writing anything doesn't claim the node, so a later codec can still encode a function, and a function no codec writes is still sent by name.
NoahKusaba
marked this pull request as ready for review
November 3, 2026 04:47
Contributor
Author
|
cc @milenkovicm |
milenkovicm
self-requested a review
November 3, 2026 09:23
NoahKusaba
added a commit
to NoahKusaba/datafusion-ballista
that referenced
this pull request
Nov 6, 2026
Depend on the Ballista crates at a commit that includes apache#2752 instead of the crates beside it, and stop running the workflow on changes under ballista/, so a dependency bump in Ballista can't break this build.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
No issue yet. Follows the discussion on #2638 about how several table format codecs (Iceberg, Hudi, Delta, ...) can share one Ballista deployment.
Rationale for this change
DataFusion has
ComposedPhysicalExtensionCodecbut no logical counterpart. Without one, each format crate has to wrap the codec it's given and invent its own framing, and protobuf has no type identity, so a codec that "tries to decode" bytes another codec wrote can decode them into the wrong thing.ComposedLogicalExtensionCodecis the logical counterpart, and routes the same way: every payload records the position of the codec that encoded it, and only that codec decodes it.What changes are included in this PR?
ballista_core::serde::ComposedLogicalExtensionCodec, matching DataFusion'sComposedPhysicalExtensionCodec:DataEncoderTuple { encoder_position, blob }layout;extending-components.md, pairing it with DataFusion'sComposedPhysicalExtensionCodec. It notes the shared limitation that only the first codec can encode a function (the trait's default sends functions by name), and that the physical codec doesn't route custom physical expressions, window functions or higher-order functions. Table scans, such as Iceberg's, need neither.The module is self-contained, with a TODO to move it into
datafusion-protobesideComposedPhysicalExtensionCodec.Are there any user-facing changes?
Yes, a new public
ComposedLogicalExtensionCodecand docs. Nothing existing changes; no.protofiles are touched.