Skip to content

Enable parquet metadata prefetching by default - #23307

Closed
TomAugspurger wants to merge 4 commits into
NVIDIA:release/26.08from
TomAugspurger:tom/parquet-metadata-prefetch-default
Closed

Enable parquet metadata prefetching by default#23307
TomAugspurger wants to merge 4 commits into
NVIDIA:release/26.08from
TomAugspurger:tom/parquet-metadata-prefetch-default

Conversation

@TomAugspurger

@TomAugspurger TomAugspurger commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

This updates the cudf-polars configuration to enable parquet metadata prefetching by default. It can be disabled through the environment variable

CUDF_POLARS__PARQUET_OPTIONS__PREFETCH_FILE_METADATA=0

or through Python when constructing the ParquetOptions.

We need to do some benchmarking to make sure this is beneficial everywhere.

Closes #22826

Description

Checklist

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

jolorunyomi and others added 4 commits July 16, 2026 14:30
…data members (NVIDIA#23267)

Route IO builders through option setters because they are responsible for validation.
Also fixed validation in `set_quoting`.

Authors:
  - Vukasin Milovanovic (https://github.com/vuule)

Approvers:
  - Muhammad Haseeb (https://github.com/mhaseeb123)
  - David Wendt (https://github.com/davidwendt)
  - Misiu Godfrey (https://github.com/misiugodfrey)

URL: NVIDIA#23267
…IA#23147)

Closes NVIDIA#23146

This PR adds a `direct_inner_join` free function to libcudf, the first step of the perfect hash join effort in NVIDIA#23126. The keys are a single `UINT32` column per side, produced by a prior perfect hashing pass such as `cudf::key_remapping`, dictionary encoding, or dense integer primary keys. The right keys act as a perfect hash of the right rows: a lookup table of caller-specified `capacity` entries maps each key value to its row index and each left key probes that table directly, so the join performs no hashing or key comparison at all.

- The caller controls the memory footprint via the explicit `capacity` argument. All key values must be in `[0, capacity)` and the right keys must be distinct; behavior is undefined otherwise.
- Inner join only, as a free function: no table reuse across probes is needed, so there is no join object.
- The build scatters right row indices into the lookup table with `cub::DeviceTransform::Fill` + `cub::DeviceFor::Bulk`; the probe is a single `cub`-based `copy_if` pass emitting the matched index pairs.
- A new `JOIN_NVBENCH` benchmark compares `inner_join`, `distinct_hash_join`, and `direct_inner_join` on identical conforming input; results in the comment below.

Authors:
  - Yunsong Wang (https://github.com/PointKernel)

Approvers:
  - Tianyu Liu (https://github.com/kingcrimsontianyu)
  - Shruti Shivakumar (https://github.com/shrshi)
  - Muhammad Haseeb (https://github.com/mhaseeb123)

URL: NVIDIA#23147
This updates the cudf-polars configuration to enable parquet metadata
prefetching by default. It can be disabled through the environment
variable

    CUDF_POLARS__PARQUET_OPTIONS__PREFETCH_FILE_METADATA=0

or through Python when constructing the ParquetOptions.
@copy-pr-bot

copy-pr-bot Bot commented Jul 16, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@github-actions github-actions Bot added Python Affects Python cuDF API. cudf-polars Issues specific to cudf-polars labels Jul 16, 2026
@GPUtester GPUtester moved this to In Progress in cuDF Python Jul 16, 2026
@TomAugspurger
TomAugspurger changed the base branch from main to release/26.08 July 17, 2026 13:54
@TomAugspurger TomAugspurger added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Jul 17, 2026
@TomAugspurger

Copy link
Copy Markdown
Contributor Author

I'm seeing a surprising amount of GIL contention during metadata prefetching:

image

I think the majority of this is around plc.io.parquet_metadata.read_parquet_footers. Note that the read_parquet_footers reported by libcudf takes ~20ms, while the wrapper in python takes ~240ms.

@TomAugspurger

Copy link
Copy Markdown
Contributor Author

Subsumed by #23558.

@github-project-automation github-project-automation Bot moved this from In Progress to Done in cuDF Python Aug 6, 2026
@TomAugspurger
TomAugspurger deleted the tom/parquet-metadata-prefetch-default branch August 6, 2026 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cudf-polars Issues specific to cudf-polars improvement Improvement / enhancement to an existing function non-breaking Non-breaking change Python Affects Python cuDF API.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants