Skip to content

perf: use compact pruning for large string NOT IN lists - #24781

Open
kumarUjjawal wants to merge 1 commit into
apache:mainfrom
kumarUjjawal:feat/compact-not-in-list-pruning
Open

perf: use compact pruning for large string NOT IN lists#24781
kumarUjjawal wants to merge 1 commit into
apache:mainfrom
kumarUjjawal:feat/compact-not-in-list-pruning

Conversation

@kumarUjjawal

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

Large string NOT IN lists create long expression chains for Parquet pruning. These expressions are expensive to build and evaluate.

What changes are included in this PR?

  • Use a compact sorted domain for large, non-null string NOT IN lists.

  • Preserve the existing behavior for lists containing NULL.

  • Add unit tests and Parquet row-group and page-pruning tests.

  • Add a mixed-container regression test.

  • Extend the existing benchmark and configuration documentation.

  • In a local benchmark with 1,024 values, construction was about 17 times faster and evaluation was about 27 times faster.

Are these changes tested?

Yes

Are there any user-facing changes?

No public API changes

@github-actions github-actions Bot added documentation Improvements or additions to documentation core Core DataFusion crate sqllogictest SQL Logic Tests (.slt) common Related to common crate labels Aug 30, 2026
@kumarUjjawal
kumarUjjawal requested a review from adriangb August 30, 2026 04:08
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.57143% with 24 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.53%. Comparing base (4ada0dc) to head (6241218).

Files with missing lines Patch % Lines
datafusion/pruning/src/pruning_predicate.rs 90.00% 7 Missing and 11 partials ⚠️
datafusion/pruning/src/string_in_list.rs 80.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #24781      +/-   ##
==========================================
- Coverage   81.53%   81.53%   -0.01%     
==========================================
  Files        1123     1123              
  Lines      406041   406218     +177     
  Branches   406041   406218     +177     
==========================================
+ Hits       331049   331192     +143     
- Misses      55631    55652      +21     
- Partials    19361    19374      +13     

☔ View full report in Codecov by Harness.
📢 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.

@adriangb

Copy link
Copy Markdown
Contributor

@sunchao would you be interested in reviewing @kumarUjjawal's work?

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

Labels

common Related to common crate core Core DataFusion crate documentation Improvements or additions to documentation sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants