-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add multifile dictionary pruning support for hybrid scan parquet reader #22866
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
Merged
Merged
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
bfce489
[WIP] Add dictionary page filtering and byte range retrieval to hybri…
qbacpey 187036c
Refactor hybrid scan multifile filters test to simplify row group fil…
qbacpey 0115910
Refactor setup_multifile_page_index to simplify buffer management in …
qbacpey cddcce3
Enhance create_parquet_with_stats to support customizable column name…
qbacpey f632241
Refactor column chunk offset retrieval in hybrid scan helpers to use …
qbacpey 451367d
Merge branch 'main' of github.com:rapidsai/cudf into hybrid/dict-mult…
qbacpey a76277e
Refactor dictionary page byte range functions to return pairs of vectors
qbacpey 291125f
Merge remote-tracking branch 'upstream/main' into hybrid/dict-multi-t2
qbacpey d2ba16d
Refactor comments and add validation checks in hybrid scan helpers an…
qbacpey 94251cd
Update copyright notices to include "AFFILIATES" in multiple files
qbacpey a163660
Remove out-of-bounds check from `create_parquet_with_stats` and updat…
qbacpey 865ab76
Merge branch 'main' into hybrid/dict-multi-t2
mhaseeb123 506ee8c
Merge remote-tracking branch 'upstream/main' into hybrid/dict-multi-t2
qbacpey 4a34b6c
Update copyright notice and refactor hybrid scan multifile tests
qbacpey b7b1791
Merge branch 'main' into hybrid/dict-multi-t2
qbacpey 91f421e
Merge branch 'main' into hybrid/dict-multi-t2
mhaseeb123 e5d97d5
Merge remote-tracking branch 'upstream/main' into hybrid/dict-multi-t2
qbacpey eb2dbd4
Refactor column chunk offset retrieval in parquet reader
qbacpey 2cd38dc
Merge remote-tracking branch 'upstream/main' into hybrid/dict-multi-t2
qbacpey e6009c1
Refactor hybrid scan reader implementation
qbacpey 2f7d23a
Merge remote-tracking branch 'upstream/main' into hybrid/dict-multi-t2
qbacpey da507b5
Add hybrid scan read-amplification benchmark to nvbench
qbacpey cca34ec
Merge remote-tracking branch 'upstream/main' into hybrid/dict-multi-t2
qbacpey 8b01cc4
updates the documentation and error handling for schema indices in th…
qbacpey ae55fc5
Refactor dictionary page byte range handling in hybrid scan implement…
qbacpey d1e2b89
Merge remote-tracking branch 'upstream/main' into hybrid/dict-multi-t2
qbacpey 2fc348d
Merge remote-tracking branch 'upstream/main' into hybrid/dict-multi-t2
qbacpey a07b7b5
Refactor and clarify Parquet reader helper functions
qbacpey 7aa70cf
Refactor filter_row_groups_with_dictionaries to use parquet_reader_op…
qbacpey f13cac8
Merge branch 'main' into hybrid/dict-multi-t2
mhaseeb123 eea8f1f
Mark unused variables in hybrid_scan_common.cpp to avoid compiler war…
qbacpey 7d7271e
Merge branch 'main' into hybrid/dict-multi-t2
qbacpey 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
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
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
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
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
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
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.
Validate row-group/source bounds before indexing metadata vectors.
At Line 498,
per_file_metadata[src_index].row_groups[rg_index]is accessed without validating input shape/bounds first. Ifrow_group_indiceshas a mismatched source count or an out-of-range row-group index, this can trigger out-of-bounds access and crash.Suggested fix
std::pair<std::vector<byte_range_info>, std::vector<cudf::size_type>> aggregate_reader_metadata::dictionary_pages_byte_ranges( cudf::host_span<std::vector<cudf::size_type> const> row_group_indices, host_span<data_type const> output_dtypes, host_span<cudf::size_type const> output_column_schemas, std::reference_wrapper<ast::expression const> filter) { + CUDF_EXPECTS(row_group_indices.size() == per_file_metadata.size(), + "Row group indices must provide one vector per input source", + std::invalid_argument); + for (std::size_t src_index = 0; src_index < row_group_indices.size(); ++src_index) { + auto const num_row_groups = per_file_metadata[src_index].row_groups.size(); + for (auto const rg_index : row_group_indices[src_index]) { + CUDF_EXPECTS(std::cmp_greater_equal(rg_index, 0) and + std::cmp_less(rg_index, num_row_groups), + "Encountered out-of-bounds row group index for data source", + std::invalid_argument); + } + } + // Collect (in)equality literals for each input table column auto const literals = dictionary_literals_collector{filter.get(), output_dtypes}.get_literals();🤖 Prompt for AI Agents