Skip to content

refactor: add FileSelection to next provider for DeltaTableProvider removal#4172

Merged
ion-elgreco merged 3 commits intodelta-io:mainfrom
ethan-tyler:feat/file-selection-foundations-clean
Feb 7, 2026
Merged

refactor: add FileSelection to next provider for DeltaTableProvider removal#4172
ion-elgreco merged 3 commits intodelta-io:mainfrom
ethan-tyler:feat/file-selection-foundations-clean

Conversation

@ethan-tyler
Copy link
Copy Markdown
Collaborator

Description

DML operations scope scans to specific files via DeltaTableProvider::with_files(Vec<Add>). The next provider (DeltaScan)
has no equivalent. This PR adds that foundation.

Introduces FileSelection a pub(crate) struct holding normalized file IDs
(HashSet<String>) that scopes scans to specific files. Unselected files are
excluded in the replay phase before DV tasks or data reads are produced.

No callers yet and will be added when DML operations migrate.

Migration path

  1. This PR: introduce FileSelection, wire into DeltaScan pipeline
  2. Convert DML ops from DeltaTableProvider::with_files(Vec<Add>) to
    DeltaScan::with_file_selection(FileSelection::from_adds(...))
  3. Convert optimize's partition filtered scans to FileSelection::from_paths
  4. Remove DeltaTableProvider and with_files

CC: @roeap

Related Issue(s)

Documentation

@github-actions github-actions Bot added the binding/rust Issues for the Rust crate label Feb 6, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 7, 2026

Codecov Report

❌ Patch coverage is 85.13238% with 73 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.61%. Comparing base (4ed4108) to head (e449b97).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...re/src/delta_datafusion/table_provider/next/mod.rs 80.99% 28 Missing and 41 partials ⚠️
...elta_datafusion/table_provider/next/scan/replay.rs 89.65% 1 Missing and 2 partials ⚠️
...c/delta_datafusion/table_provider/next/scan/mod.rs 96.77% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4172      +/-   ##
==========================================
+ Coverage   76.36%   76.61%   +0.25%     
==========================================
  Files         166      166              
  Lines       46308    46774     +466     
  Branches    46308    46774     +466     
==========================================
+ Hits        35364    35838     +474     
+ Misses       9263     9213      -50     
- Partials     1681     1723      +42     

☔ 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.

Copy link
Copy Markdown
Collaborator

@ion-elgreco ion-elgreco left a comment

Choose a reason for hiding this comment

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

Looks good! Just two notes, I would make the tests more explicit in terms of file length checks and row size checks, instead of selected < base. And I would look into retaining files before visiting with kernel

Comment thread crates/core/src/delta_datafusion/table_provider/next/scan/replay.rs Outdated
@ethan-tyler ethan-tyler marked this pull request as ready for review February 7, 2026 03:57
Comment thread crates/core/src/delta_datafusion/table_provider/next/scan/replay.rs Outdated
Copy link
Copy Markdown
Collaborator

@ion-elgreco ion-elgreco left a comment

Choose a reason for hiding this comment

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

Thanks!

@ion-elgreco ion-elgreco merged commit 25b4968 into delta-io:main Feb 7, 2026
26 checks passed
@ethan-tyler ethan-tyler deleted the feat/file-selection-foundations-clean branch February 7, 2026 16:28
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