Add parquet benchmark for output_dict_columns option - #23596
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughChangesParquet dictionary output benchmarks
Estimated code review effort: 2 (Simple) | ~10 minutes Mergeability Score: ⚪ Minimal · up to 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: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
vuule
left a comment
There was a problem hiding this comment.
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”?
6b75627 to
6edb425
Compare
|
@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! |
There was a problem hiding this comment.
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
📒 Files selected for processing (2)
cpp/benchmarks/io/nvbench_helpers.hppcpp/benchmarks/io/parquet/parquet_reader_options.cpp
6edb425 to
a40db45
Compare
| // 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"); | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
I don't think we need this check. Other options don't check if they are applied correctly.
Description
This PR adds benchmarks to test the newly added
output_dict_columnsoptions for the Parquet reader, which was introduced in this PRChecklist