Skip to content

Add config option for JIT parquet filtering - #21460

Merged
rapids-bot[bot] merged 23 commits into
NVIDIA:mainfrom
Matt711:fea/polars/jit-parquet-filter
Jul 6, 2026
Merged

Add config option for JIT parquet filtering#21460
rapids-bot[bot] merged 23 commits into
NVIDIA:mainfrom
Matt711:fea/polars/jit-parquet-filter

Conversation

@Matt711

@Matt711 Matt711 commented Feb 17, 2026

Copy link
Copy Markdown
Member

Description

Adds an option to cudf-polars to to control whether parquet predicates are JIT compiled.

Contribute to #21456

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@Matt711
Matt711 requested a review from a team as a code owner February 17, 2026 15:29
@Matt711
Matt711 requested review from bdice and rjzamora February 17, 2026 15:29
@Matt711 Matt711 added feature request New feature or request non-breaking Non-breaking change labels Feb 17, 2026
@github-actions github-actions Bot added Python Affects Python cuDF API. cudf-polars Issues specific to cudf-polars labels Feb 17, 2026
@GPUtester GPUtester moved this to In Progress in cuDF Python Feb 17, 2026
duckdb_err = None
except ImportError as e:
duckdb = None
duckdb = None # type: ignore[assignment]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If you needed these locally, you possibly had duckdb installed in your mypy env, while CI doesn't.

You could maybe change this to type: ignore[assignment,unused-ignore]

@copy-pr-bot

copy-pr-bot Bot commented Feb 18, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@Matt711

Matt711 commented Feb 18, 2026

Copy link
Copy Markdown
Member Author

/ok to test 9c12fec

@Matt711

Matt711 commented Feb 18, 2026

Copy link
Copy Markdown
Member Author

/merge

@Matt711

Matt711 commented Feb 18, 2026

Copy link
Copy Markdown
Member Author

/ok to test 1790ac6

@Matt711

Matt711 commented Feb 24, 2026

Copy link
Copy Markdown
Member Author

/ok to test 1a7cc96

@Matt711

Matt711 commented Feb 26, 2026

Copy link
Copy Markdown
Member Author

/ok to test 6bc7595

@vyasr

vyasr commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

@Matt711 if you can resolve conflicts this PR is probably ready to merge.

@vyasr

vyasr commented Mar 10, 2026

Copy link
Copy Markdown
Contributor

/ok to test d6aed0a

@vyasr

vyasr commented Mar 10, 2026

Copy link
Copy Markdown
Contributor

/merge

@vyasr

vyasr commented Mar 16, 2026

Copy link
Copy Markdown
Contributor

/ok to test 8e5279e

…uet-filter

# Conflicts:
#	python/cudf_polars/cudf_polars/utils/config.py
#	python/cudf_polars/tests/test_parquet_filters.py
@vyasr
vyasr requested a review from a team as a code owner June 16, 2026 22:27
@vyasr

vyasr commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

/ok to test 08e36db

@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds a use_jit_filter boolean field to ParquetOptions, wired to the CUDF_POLARS__PARQUET_OPTIONS__USE_JIT_FILTER env var with a False default. The non-streaming and streaming Parquet read paths now conditionally enable JIT filtering when predicates are present and the option is set. CSV file opening uses explicit UTF-8 encoding.

Changes

JIT Filter Configuration and Wiring

Layer / File(s) Summary
ParquetOptions.use_jit_filter field and validation
python/cudf_polars/cudf_polars/utils/config.py
Adds the use_jit_filter boolean field to ParquetOptions with env-var binding (CUDF_POLARS__PARQUET_OPTIONS__USE_JIT_FILTER), a docstring entry, and a __post_init__ type check that raises TypeError for non-boolean values.
JIT filter wiring in non-streaming and streaming read paths
python/cudf_polars/cudf_polars/dsl/ir.py, python/cudf_polars/cudf_polars/streaming/actor_graph/io.py
Refactors ParquetReaderOptions construction in both Parquet read paths to use a builder that conditionally calls use_jit_filter(True) when a predicate is present and the option is enabled. CSV scan file opening is updated to specify explicit UTF-8 encoding. The streaming function gains a new parquet_options: ParquetOptions parameter passed from config_options at the call site.
Config and filter tests for use_jit_filter
python/cudf_polars/tests/test_config.py, python/cudf_polars/tests/test_parquet_filters.py
Extends test_config.py to assert default False, env-var activation, and from_polars_engine propagation. Adds test_jit_filter in test_parquet_filters.py that runs a filtered GPU Parquet scan with use_jit_filter=True.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • rapidsai/cudf#22758: Both PRs modify python/cudf_polars/cudf_polars/streaming/actor_graph/io.py around the RapidsMPF/parquet read fast path and StreamingScan plumbing.

Suggested labels

improvement

Suggested reviewers

  • TomAugspurger
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 27.27% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding a JIT parquet filtering config option.
Description check ✅ Passed The description is directly related to the changeset and accurately states that parquet predicates can be JIT compiled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

Use executor='in-memory' to avoid triggering DefaultSingletonEngine,
which wasn't being shut down before subsequent spmd-small tests could
run on the same pytest-xdist worker.
@vyasr

vyasr commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

/ok to test 6a3a2ab

Explicitly pass encoding='utf-8' to path.open() in the CSV blank-line
skip loop. Without this, the default encoding on systems with LANG=C
(e.g. CI containers) is ASCII, which fails when the CSV file contains
non-ASCII data (e.g. UTF-8 encoded strings).
@vyasr

vyasr commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

/ok to test 0827b5e

@vyasr

vyasr commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

/ok to test c32dd63

@vyasr

vyasr commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

/ok to test 31e672d

@Matt711

Matt711 commented Jun 25, 2026

Copy link
Copy Markdown
Member Author

/ok to test 518c903

Comment thread python/cudf_polars/cudf_polars/streaming/actor_graph/io.py Outdated
@Matt711

Matt711 commented Jun 25, 2026

Copy link
Copy Markdown
Member Author

/ok to test 49cc035

@Matt711

Matt711 commented Jul 6, 2026

Copy link
Copy Markdown
Member Author

/ok to test 6446f9a

@rapids-bot
rapids-bot Bot merged commit 2c3f616 into NVIDIA:main Jul 6, 2026
108 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in cuDF Python Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5 - Ready to Merge Testing and reviews complete, ready to merge cudf-polars Issues specific to cudf-polars feature request New feature or request non-breaking Non-breaking change Python Affects Python cuDF API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants