-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Support Parquet DELTA encodings with more than 64 values per mini-block #23314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
pramodsatya
wants to merge
15
commits into
rapidsai:main
Choose a base branch
from
pramodsatya:parquet-delta-large-mini-blocks
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 7 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
45174ea
Support Parquet DELTA_BINARY_PACKED mini-blocks over 64 values
pramodsatya 3c90717
Support DELTA_BYTE_ARRAY/DELTA_LENGTH_BYTE_ARRAY mini-blocks over 64 …
pramodsatya 549ded7
Drop the DELTA mini-block size cap and fix nested decode races
pramodsatya aa8b101
Add DELTA encoding axes to the Parquet reader benchmarks
pramodsatya e732a18
Reserve the DELTA_BYTE_ARRAY prefix seed ahead of the skip scratch
pramodsatya 71abede
Use canonical NVIDIA copyright notice in Parquet DELTA sources
pramodsatya 995238a
Merge branch 'main' into parquet-delta-large-mini-blocks
pramodsatya 25b2f69
Address review comments
pramodsatya 5432caf
Reuse the compact protocol writer in the DELTA test fixtures and addr…
pramodsatya 18a5946
Use cooperative_groups and a bits_per_byte constant in Parquet DELTA …
pramodsatya 7dc4095
Add CompactProtocolWriter page-header overloads and use them in DELTA…
pramodsatya fb5c135
Address review comments on Parquet DELTA large mini-block support
pramodsatya 31f9891
Merge branch 'main' into parquet-delta-large-mini-blocks
pramodsatya 074c27a
Merge branch 'main' into pr-23314
vyasr 6822b1b
Merge branch 'main' into parquet-delta-large-mini-blocks
vyasr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,98 @@ | ||
| /* | ||
| * SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| #include "reader_common.hpp" | ||
|
|
||
| #include <benchmarks/common/generate_input.hpp> | ||
| #include <benchmarks/io/cuio_common.hpp> | ||
| #include <benchmarks/io/nvbench_helpers.hpp> | ||
|
|
||
| #include <cudf/io/parquet.hpp> | ||
| #include <cudf/utilities/error.hpp> | ||
|
|
||
| #include <nvbench/nvbench.cuh> | ||
|
|
||
| // Benchmarks decoding pages written with an explicitly requested column encoding. The writer's | ||
| // defaults never choose the DELTA_* encodings, so `parquet_read_decode` does not exercise their | ||
| // decode kernels; this benchmark covers them (with PLAIN as the baseline encoding). | ||
|
|
||
| namespace { | ||
|
|
||
| cudf::io::column_encoding retrieve_column_encoding_enum(std::string_view encoding_string) | ||
| { | ||
| if (encoding_string == "PLAIN") { return cudf::io::column_encoding::PLAIN; } | ||
| if (encoding_string == "DELTA_BINARY_PACKED") { | ||
| return cudf::io::column_encoding::DELTA_BINARY_PACKED; | ||
| } | ||
| if (encoding_string == "DELTA_LENGTH_BYTE_ARRAY") { | ||
| return cudf::io::column_encoding::DELTA_LENGTH_BYTE_ARRAY; | ||
| } | ||
| if (encoding_string == "DELTA_BYTE_ARRAY") { return cudf::io::column_encoding::DELTA_BYTE_ARRAY; } | ||
| CUDF_FAIL("Unsupported column encoding: " + std::string(encoding_string)); | ||
| } | ||
|
|
||
| void bench_read_encoding(nvbench::state& state, std::vector<cudf::type_id> const& d_types) | ||
| { | ||
| auto const encoding = retrieve_column_encoding_enum(state.get_string("encoding")); | ||
| auto const source_type = retrieve_io_type_enum(state.get_string("io_type")); | ||
| auto const data_size = static_cast<size_t>(state.get_int64("data_size")); | ||
| auto const cardinality = static_cast<cudf::size_type>(state.get_int64("cardinality")); | ||
| auto const run_length = static_cast<cudf::size_type>(state.get_int64("run_length")); | ||
| cuio_source_sink_pair source_sink(source_type); | ||
|
|
||
| auto const num_rows_written = [&]() { | ||
| auto const tbl = create_random_table( | ||
| cycle_dtypes(d_types, num_cols), | ||
| table_size_bytes{data_size}, | ||
| data_profile_builder().cardinality(cardinality).avg_run_length(run_length)); | ||
| auto const view = tbl->view(); | ||
|
|
||
| cudf::io::table_input_metadata metadata(view); | ||
| for (auto& col_meta : metadata.column_metadata) { | ||
| col_meta.set_encoding(encoding); | ||
| } | ||
|
|
||
| cudf::io::parquet_writer_options write_opts = | ||
| cudf::io::parquet_writer_options::builder(source_sink.make_sink_info(), view) | ||
| .metadata(std::move(metadata)) | ||
| .compression(cudf::io::compression_type::NONE) | ||
| .dictionary_policy(cudf::io::dictionary_policy::NEVER) | ||
| .write_v2_headers(true); | ||
| cudf::io::write_parquet(write_opts); | ||
| return view.num_rows(); | ||
| }(); | ||
|
|
||
| parquet_read_common(num_rows_written, num_cols, source_sink, state); | ||
| } | ||
|
|
||
| } // namespace | ||
|
|
||
| void BM_parquet_read_delta_binary(nvbench::state& state) | ||
| { | ||
| bench_read_encoding(state, {cudf::type_id::INT32, cudf::type_id::INT64}); | ||
| } | ||
|
|
||
| void BM_parquet_read_delta_string(nvbench::state& state) | ||
| { | ||
| bench_read_encoding(state, {cudf::type_id::STRING}); | ||
| } | ||
|
|
||
| NVBENCH_BENCH(BM_parquet_read_delta_binary) | ||
| .set_name("parquet_read_delta_binary") | ||
| .add_string_axis("encoding", {"PLAIN", "DELTA_BINARY_PACKED"}) | ||
| .add_string_axis("io_type", {"DEVICE_BUFFER"}) | ||
| .set_min_samples(4) | ||
| .add_int64_axis("cardinality", {0, 1000}) | ||
| .add_int64_axis("run_length", {1, 32}) | ||
| .add_int64_axis("data_size", {512 << 20}); | ||
|
|
||
| NVBENCH_BENCH(BM_parquet_read_delta_string) | ||
| .set_name("parquet_read_delta_string") | ||
| .add_string_axis("encoding", {"PLAIN", "DELTA_LENGTH_BYTE_ARRAY", "DELTA_BYTE_ARRAY"}) | ||
| .add_string_axis("io_type", {"DEVICE_BUFFER"}) | ||
| .set_min_samples(4) | ||
| .add_int64_axis("cardinality", {0, 1000}) | ||
| .add_int64_axis("run_length", {1, 32}) | ||
| .add_int64_axis("data_size", {512 << 20}); | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
post benchmark results in the pr conversation page for before/after adding the decoding changes.