Skip to content

Upgrade DataFusion fork to 56 - #92

Open
xudong963 wants to merge 11 commits into
branch-56from
upgrade/datafusion-56-fork-patches
Open

xudong963 wants to merge 11 commits into
branch-56from
upgrade/datafusion-56-fork-patches

Conversation

@xudong963

@xudong963 xudong963 commented Nov 10, 2026 •

Copy link
Copy Markdown

Which issue does this PR close?

None — maintained fork upgrade.

Rationale for this change

Upgrade the fork to the finalized Apache branch-56 at cce6374e6256, while preserving the DF55 fork behavior.

What changes are included in this PR?

  • Carry forward the reviewed fork patches for SMJ ordering, reverse Parquet APIs, Top-K, Interleave, grouped aggregates, CSV header matching, and their regressions.
  • Include the final four upstream backports after the original 964f925bd024 baseline: finer sorts above merges, ListingTable expression adapters, per-partition constant ordering, and the final changelog.
  • No file-level merge conflicts; the fork remains 10 commits above the finalized upstream baseline.

What is the testing strategy for this PR?

cargo fmt --check, all-target/all-feature Clippy, affected crate tests, and limit.slt, window.slt, and csv_files.slt pass locally. GitHub CI is running on 2435565f6c41; the local CI-profile workspace run passed 1,502 DataFusion tests before a macOS rust-objcopy artifact failure prevented the extended-test binary from launching.

Are there any user-facing changes?

DF56 / Arrow 60.1. CSV physical-plan header matching uses protobuf field 10 because upstream uses field 9 for the terminator. Drain old serialized plans and upgrade producers/consumers together.

Carry forward the downstream API from fork #73; row order within each row group is unchanged.
Port the fork #73 planner behavior and its four ordering regressions to DF56.
Keep DF56 typed storage and restore the fork review fix rejecting mismatched timezone or decimal metadata. Cover string variants using the upstream generic downcast guard.
Keep fork #73 behavior: replacing incompatible Interleave children returns a Union with every child partition. Update the upstream deferred-invariant regressions to require an executable fallback.
Port fork #77. Adapt Median through the shared DF56 percentile implementation, retaining decimal metadata and the per-group percentile state column. Preserve upstream ordered first/last fast paths and add regression coverage for the changed state layout.
Port fork #91, including preserving reads and filter/null/merge regressions, while retaining DF56 ordered-aggregate fast paths.
Port fork #84 while preserving DF56 null-regex and custom terminator support. CSV scan field 9 now belongs to upstream terminator; use field 10 for header matching and regenerate protobuf bindings. Serialized CSV plans must not be exchanged between DF55-fork and DF56-fork processes.
@xudong963
xudong963 marked this pull request as ready for review November 13, 2026 07:15

@zhuqi-lucas zhuqi-lucas left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Every fork patch on branch-55 is carried here or already in upstream branch-56, and the fork tests survive with no fewer assertions. Two small test notes inline.

}

#[test]
fn preserving_reads_keep_median_decimal_metadata() -> Result<()> {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fork's median.rs::groups_preserving_reads_keep_median_state covered the Float64 case (repeated reads, state values, empty selection). Could we keep a Float64 median version alongside this decimal one?


#[test]
fn test_interleave_rebuild_defers_partitioning_invariant() -> Result<()> {
fn test_interleave_rebuild_falls_back_to_union() -> Result<()> {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fork's interleave_child_rewrite_falls_back_to_union also asserted that a compatible rewrite stays an InterleaveExec with 3 partitions. Could we keep that half too?

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants