Skip to content

Add parquet benchmark for output_dict_columns option - #23596

Open
y2kiran wants to merge 4 commits into
NVIDIA:mainfrom
y2kiran:ykiran-dict-transcode-bench
Open

Add parquet benchmark for output_dict_columns option#23596
y2kiran wants to merge 4 commits into
NVIDIA:mainfrom
y2kiran:ykiran-dict-transcode-bench

Conversation

@y2kiran

@y2kiran y2kiran commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Description

This PR adds benchmarks to test the newly added output_dict_columns options for the Parquet reader, which was introduced in this PR

Checklist

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

@y2kiran
y2kiran requested review from a team as code owners August 7, 2026 22:08
@github-actions github-actions Bot added libcudf Affects libcudf (C++/CUDA) code. CMake CMake build issue labels Aug 7, 2026
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 1b43a691-c7c2-4853-bff4-8578303e0064

📥 Commits

Reviewing files that changed from the base of the PR and between 6edb425 and a40db45.

📒 Files selected for processing (1)
  • cpp/benchmarks/io/parquet/parquet_reader_options.cpp

📝 Walkthrough

Summary by CodeRabbit

  • New Features
    • Added benchmarks for Parquet dictionary output during reads.
    • Supports comparing dictionary output enabled and disabled across different row-group sizes.
    • Covers configurable column selection, row selection, string conversion, metadata, and timestamp scenarios.
    • Added validation to confirm that string reads produce the configured dictionary or standard string output.

Walkthrough

Changes

Parquet dictionary output benchmarks

Layer / File(s) Summary
Dictionary output benchmark contract
cpp/benchmarks/io/nvbench_helpers.hpp
Adds the public output_dict enum with YES and NO values. Registers string conversions for the enum.
Parquet benchmark integration and coverage
cpp/benchmarks/io/parquet/parquet_reader_options.cpp
Passes output_dict to output_dict_columns, validates configured string output, exposes the axis in existing benchmarks, and adds a row-group benchmark. Updates copyright attribution.

Estimated code review effort: 2 (Simple) | ~10 minutes

Mergeability Score: ⚪ Minimal · up to a40db

This PR adds benchmark coverage for Parquet reader options without introducing a user-facing behavior change. No actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: mattgara, misiugodfrey, vuule

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the addition of a Parquet benchmark for the output_dict_columns option.
Description check ✅ Passed The description accurately explains that the pull request adds Parquet reader benchmarks for the output_dict_columns option.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@vuule vuule left a comment

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.

Could we add this to parquet_reader_options.cpp and follow the existing benchmark patterns there? Since this measures output_dict_columns, keeping it with the other reader-options benchmarks would make it easier to find and maintain.
Could we also make the PR title more specific, for example: “Add benchmark for Parquet output_dict_columns”?

@vuule vuule added tests Unit testing for project improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Aug 12, 2026
@y2kiran y2kiran changed the title Add parquet benchmark Add parquet benchmark for output_dict_columns option Aug 12, 2026
@y2kiran
y2kiran force-pushed the ykiran-dict-transcode-bench branch from 6b75627 to 6edb425 Compare August 12, 2026 21:43
@y2kiran
y2kiran requested a review from a team as a code owner August 12, 2026 21:43
@copy-pr-bot

copy-pr-bot Bot commented Aug 12, 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.

@y2kiran

y2kiran commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

@vuule Apologies for the title. Apparently I missed it and it just used the name of the commit.

I've incorporated this into the existing parquet_reader_options benchmark. Thanks for the input!

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@cpp/benchmarks/io/parquet/parquet_reader_options.cpp`:
- Around line 206-222: The BM_parquet_read_options benchmark currently validates
only column count, so add a non-timed preflight that inspects an eligible flat
STRING column and verifies its type is DICTIONARY32 when output_dict is YES and
STRING when output_dict is NO. Keep the timing path unchanged and use the
existing benchmark setup and output_dict axis symbols.
- Around line 221-222: Update the row_group_size_rows axis in the benchmark
options to use 100'000 instead of 1'000'000, preserving 0 while ensuring the
configured values represent distinct row-group limits.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 5e4f95eb-a035-46c1-a993-59aa00e24692

📥 Commits

Reviewing files that changed from the base of the PR and between 4ec7b3b and 6edb425.

📒 Files selected for processing (2)
  • cpp/benchmarks/io/nvbench_helpers.hpp
  • cpp/benchmarks/io/parquet/parquet_reader_options.cpp

Comment thread cpp/benchmarks/io/parquet/parquet_reader_options.cpp Outdated
Comment thread cpp/benchmarks/io/parquet/parquet_reader_options.cpp Outdated
@y2kiran
y2kiran force-pushed the ykiran-dict-transcode-bench branch from 6edb425 to a40db45 Compare August 13, 2026 19:44
@vuule
vuule self-requested a review August 14, 2026 02:36
Comment on lines +100 to +119
// Non-timed preflight: confirm the reader honors `output_dict_columns` on a flat STRING column --
// YES transcodes it to DICTIONARY32, NO leaves it as STRING. Skipped when
// `convert_strings_to_categories` is set.
if constexpr (not str_to_categories) {
auto const preflight_tbl = cudf::io::read_parquet(read_options).tbl;
auto const preflight = preflight_tbl->view();
auto const has_type = [&](cudf::type_id id) {
return std::any_of(preflight.begin(), preflight.end(), [id](auto const& col) {
return col.type().id() == id;
});
};
if constexpr (output_dict_columns) {
CUDF_EXPECTS(has_type(cudf::type_id::DICTIONARY32),
"output_dict_columns=YES must produce a DICTIONARY32 column");
} else {
CUDF_EXPECTS(has_type(cudf::type_id::STRING),
"output_dict_columns=NO must produce a STRING column");
}
}

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.

I don't think we need this check. Other options don't check if they are applied correctly.

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

Labels

CMake CMake build issue improvement Improvement / enhancement to an existing function libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change tests Unit testing for project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants