-
Notifications
You must be signed in to change notification settings - Fork 920
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
Measure the number of Parquet row groups filtered by predicate pushdown #17594
base: branch-25.02
Are you sure you want to change the base?
Measure the number of Parquet row groups filtered by predicate pushdown #17594
Conversation
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. |
// if filter is not empty, then gather row groups to read after predicate pushdown | ||
if (filter.has_value()) { | ||
filtered_row_group_indices = filter_row_groups( | ||
sources, row_group_indices, output_dtypes, output_column_schemas, filter.value(), stream); | ||
// Span of input row group indices for predicate pushdown |
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.
Moved this piece of code out of filter_row_groups()
to make its signature consistent with apply_bloom_filters()
host_span<data_type const> output_dtypes, | ||
host_span<int const> output_column_schemas, | ||
std::reference_wrapper<ast::expression const> filter, | ||
rmm::cuda_stream_view stream) const | ||
{ | ||
auto mr = cudf::get_current_device_resource_ref(); | ||
// Create row group indices. |
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.
Moved this piece outside in select_row_groups()
to take in input_row_group_indices
as input param
std::map<std::string, std::string> user_data; //!< Format-dependent metadata of the first input | ||
//!< file as key-values pairs (deprecated) | ||
std::vector<std::unordered_map<std::string, std::string>> | ||
per_file_user_data; //!< Per file format-dependent metadata as key-values pairs | ||
|
||
// The following variables are currently only computed for Parquet reader | ||
size_type num_input_row_groups; //!< Number of input row groups across all data sources |
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.
Keeping all variables tracking number of row groups as size_type
for consistency across the entire Parquet stack. Happy to change it to size_t
all across in a separate PR if needed. @vuule @nvdbaranec
bloom_filter_spans, parquet_types, total_row_groups, equality_col_schemas.size()}; | ||
bloom_filter_caster const bloom_filter_col{bloom_filter_spans, | ||
parquet_types, | ||
static_cast<size_t>(total_row_groups), |
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.
static_cast simply reformatted this line
Description
Related to #17164
This PR adds a method to measure the number of row groups filtered using stats and bloom filters during predicate pushdown.
Checklist