Skip to content

fix(core): align file stats with parquet read schema#4130

Merged
roeap merged 1 commit intodelta-io:mainfrom
roeap:refactor/scan-cleanup
Jan 27, 2026
Merged

fix(core): align file stats with parquet read schema#4130
roeap merged 1 commit intodelta-io:mainfrom
roeap:refactor/scan-cleanup

Conversation

@roeap
Copy link
Copy Markdown
Collaborator

@roeap roeap commented Jan 27, 2026

Description

During the update to DF 52 we needed to introduce a PhysicalExprAdapter to handle some test failures, but it did elude me why that would be needed. While trying to get rid of it I believe I found the root cause.

As we see in #4127, we need to be very deliberate when it comes to schemas and expressions. I think the DF update introduced an optimization in that if the optimizer can prove that a value is constant within a file via file stats, it replaces the column reference with a literal value taken from the file stats. However the file stats were not aligned to the physical read schema but were using default types leading to invalid comparisons.

This PR also cleans up some unused fields/structs that are leftovers from previous refactors.

cc: @ethan-tyler

@roeap roeap requested review from hntd187 and rtyler as code owners January 27, 2026 11:55
@github-actions github-actions Bot added the binding/rust Issues for the Rust crate label Jan 27, 2026
@roeap roeap requested a review from ion-elgreco January 27, 2026 11:55
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 27, 2026

Codecov Report

❌ Patch coverage is 87.23404% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.05%. Comparing base (2256561) to head (28b06a5).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
.../delta_datafusion/table_provider/next/scan/plan.rs 78.94% 3 Missing and 1 partial ⚠️
...c/delta_datafusion/table_provider/next/scan/mod.rs 75.00% 0 Missing and 1 partial ⚠️
...elta_datafusion/table_provider/next/scan/replay.rs 95.45% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4130      +/-   ##
==========================================
- Coverage   76.09%   76.05%   -0.04%     
==========================================
  Files         164      164              
  Lines       45095    44824     -271     
  Branches    45095    44824     -271     
==========================================
- Hits        34314    34092     -222     
+ Misses       9138     9113      -25     
+ Partials     1643     1619      -24     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@roeap roeap changed the title fix: align file stats with parquet read schema fix(core): align file stats with parquet read schema Jan 27, 2026
@roeap roeap force-pushed the refactor/scan-cleanup branch from d645370 to 0181598 Compare January 27, 2026 12:11
@roeap roeap enabled auto-merge (squash) January 27, 2026 12:24
@roeap roeap moved this to In review in delta-rust Jan 27, 2026
@roeap roeap force-pushed the refactor/scan-cleanup branch from 0181598 to 28b06a5 Compare January 27, 2026 12:43
@roeap roeap merged commit 987e535 into delta-io:main Jan 27, 2026
26 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in delta-rust Jan 27, 2026
@roeap roeap deleted the refactor/scan-cleanup branch January 27, 2026 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

binding/rust Issues for the Rust crate

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants