-
Notifications
You must be signed in to change notification settings - Fork 988
Enable using multithreaded setup_page_index in hybrid scan reader
#20721
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
base: main
Are you sure you want to change the base?
Enable using multithreaded setup_page_index in hybrid scan reader
#20721
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. |
| }; | ||
|
|
||
| // Use parallel processing only if we have enough columns to justify the overhead | ||
| constexpr std::size_t parallel_threshold = 256; |
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.
@vuule did you pick 512 for this empirically or did you run any experiments. I am seeing more benefit with 256 for the hybrid scan example but can revert.
| return; | ||
| } | ||
|
|
||
| auto& row_groups = per_file_metadata.front().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.
No need for all this anymore. Just call metadata.setup_page_index(..) method.
| all_column_chunks.emplace_back(std::ref(col)); | ||
| } | ||
| } | ||
| if (max_offset > min_offset) { |
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.
Not sure why we were checking max_offset > 0, max_offset > min_offset should be a better check unless I am missing something here?
| int64_t const length = max_offset - min_offset; | ||
| auto const idx_buf = source->host_read(min_offset, length); | ||
| // Flatten all columns into a single vector for easier task distribution | ||
| std::vector<std::reference_wrapper<ColumnChunk>> all_column_chunks; |
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 everything beyond this point as-is into the setup_page_index function.
| { | ||
| CUDF_FUNC_RANGE(); | ||
|
|
||
| // Flatten all columns into a single vector for easier task distribution |
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 as-is from the constructor
| metadata& operator=(metadata const& other) = delete; | ||
| metadata& operator=(metadata&& other) = default; | ||
|
|
||
| ~metadata() = default; |
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.
Use base reader's destructor that uses multiple threads
Description
This PR refactors the multithreaded page index setup code in main parquet reader so that the child class used in hybrid scan reader can also benefit from it. No new code is introduced.
Checklist