Skip to content

Adapt fork patches to DataFusion 54 - #64

Merged
xudong963 merged 8 commits into
branch-54from
branch-54-fixes
Jul 3, 2026
Merged

Adapt fork patches to DataFusion 54#64
xudong963 merged 8 commits into
branch-54from
branch-54-fixes

Conversation

@xudong963

@xudong963 xudong963 commented Jul 2, 2026

Copy link
Copy Markdown

Which issue does this PR close?

  • Closes #.

Rationale for this change

This PR is the manual fix layer for the fork DataFusion 54 upgrade.

The base branch branch-54 is Apache upstream/branch-54 plus a mechanical cherry-pick of the 9 fork commits from origin/branch-53. This head branch contains only the fixes needed for those imported commits to compile and pass checks on DataFusion 54.

What changes are included in this PR?

  • Adapts fork-added physical expression and optimizer code to DF54 downcast/converter APIs.
  • Removes duplicate definitions introduced by the mechanical import.
  • Deletes the stale pre-DF54 parquet opener.rs; DF54 uses opener/mod.rs.
  • Reconciles DynamicFilter proto dedup support with DF54 PhysicalPlanDecodeContext.
  • Restores scalar subquery proto compatibility while keeping DynamicFilter expression_id.
  • Fixes all-target clippy issues exposed by the upgraded branch.

Are these changes tested?

YES

Are there any user-facing changes?

No user-facing changes intended. This is an upgrade/fixup PR for the fork branch.

@xudong963
xudong963 marked this pull request as ready for review July 2, 2026 09:09
xudong963 added 3 commits July 3, 2026 04:53
Update sqllogictest plans for the standalone multi-partition TopK fix. Those plans now coalesce partitions before the pushed-down TopK and mark the TopK as preserve_partitioning=false so the final merge receives one globally sorted stream.

Make the aggregate dynamic-filter EXPLAIN ANALYZE snapshot ignore the published MIN bound because the partial aggregate can publish a different intermediate bound depending on parallel execution order; the assertion still requires the DynamicFilter and pruning predicate structure.

Bump anyhow to 1.0.103 and stabby to 72.1.8 to avoid the current cargo-audit advisory and yanked crate failure.

Ignore the current quick-xml advisories and paste maintenance warning in the audit workflow because quick-xml is constrained by the object_store 0.13.x / parquet 58.x stack in DataFusion 54, and paste is a transitive parquet/arrow-flight warning.
xudong963 added 2 commits July 3, 2026 11:36
Expose BloomFilterStatistics and RowGroupAccessPlanFilter::prune_by_bloom_filters so Atlas reverse parquet scans can reuse DataFusion's bloom-filter predicate evaluation instead of carrying a local copy. Keep the bloom_filter module itself private and re-export only the statistics adapter at the crate root to minimize the fork API surface.

@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 overall. Most of the delta is legitimate cherry-pick dedup + DF54 API adaptation, and the schema-adapt behavior restore in push_decoder.rs is covered by three focused tests. One non-blocking suggestion inline about test coverage for the new TopK branch in pushdown_sort.rs.

Comment thread datafusion/physical-optimizer/src/pushdown_sort.rs
@xudong963
xudong963 merged commit 5df21f6 into branch-54 Jul 3, 2026
69 checks passed
@xudong963
xudong963 deleted the branch-54-fixes branch July 3, 2026 05:44
MassivePizza pushed a commit that referenced this pull request Jul 15, 2026
* Adapt fork patches to DataFusion 54

* Fix CI expectations and audit advisories

* Restore parquet schema adaptation

* Fix inexact sort pushdown for standalone TopK

* Coalesce inexact standalone TopK pushdown

* Fix DataFusion 54 CI expectations

Update sqllogictest plans for the standalone multi-partition TopK fix. Those plans now coalesce partitions before the pushed-down TopK and mark the TopK as preserve_partitioning=false so the final merge receives one globally sorted stream.

Make the aggregate dynamic-filter EXPLAIN ANALYZE snapshot ignore the published MIN bound because the partial aggregate can publish a different intermediate bound depending on parallel execution order; the assertion still requires the DynamicFilter and pruning predicate structure.

Bump anyhow to 1.0.103 and stabby to 72.1.8 to avoid the current cargo-audit advisory and yanked crate failure.

Ignore the current quick-xml advisories and paste maintenance warning in the audit workflow because quick-xml is constrained by the object_store 0.13.x / parquet 58.x stack in DataFusion 54, and paste is a transitive parquet/arrow-flight warning.

* Use SortPreservingMerge for standalone inexact TopK

* Expose parquet bloom pruning helpers

Expose BloomFilterStatistics and RowGroupAccessPlanFilter::prune_by_bloom_filters so Atlas reverse parquet scans can reuse DataFusion's bloom-filter predicate evaluation instead of carrying a local copy. Keep the bloom_filter module itself private and re-export only the statistics adapter at the crate root to minimize the fork API surface.
MassivePizza pushed a commit that referenced this pull request Jul 15, 2026
* Adapt fork patches to DataFusion 54

* Fix CI expectations and audit advisories

* Restore parquet schema adaptation

* Fix inexact sort pushdown for standalone TopK

* Coalesce inexact standalone TopK pushdown

* Fix DataFusion 54 CI expectations

Update sqllogictest plans for the standalone multi-partition TopK fix. Those plans now coalesce partitions before the pushed-down TopK and mark the TopK as preserve_partitioning=false so the final merge receives one globally sorted stream.

Make the aggregate dynamic-filter EXPLAIN ANALYZE snapshot ignore the published MIN bound because the partial aggregate can publish a different intermediate bound depending on parallel execution order; the assertion still requires the DynamicFilter and pruning predicate structure.

Bump anyhow to 1.0.103 and stabby to 72.1.8 to avoid the current cargo-audit advisory and yanked crate failure.

Ignore the current quick-xml advisories and paste maintenance warning in the audit workflow because quick-xml is constrained by the object_store 0.13.x / parquet 58.x stack in DataFusion 54, and paste is a transitive parquet/arrow-flight warning.

* Use SortPreservingMerge for standalone inexact TopK

* Expose parquet bloom pruning helpers

Expose BloomFilterStatistics and RowGroupAccessPlanFilter::prune_by_bloom_filters so Atlas reverse parquet scans can reuse DataFusion's bloom-filter predicate evaluation instead of carrying a local copy. Keep the bloom_filter module itself private and re-export only the statistics adapter at the crate root to minimize the fork API surface.
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