14 #include <cudf/utilities/export.hpp>
18 #include <cuda/stream>
30 namespace cudf::io::parquet::experimental::detail {
35 class hybrid_scan_reader_impl;
41 namespace CUDF_EXPORT
cudf {
42 namespace io::parquet::experimental {
137 cudf::host_span<std::vector<size_type>
const> row_group_indices)
const;
174 cuda::stream_ref stream)
const;
186 [[nodiscard]] std::pair<std::vector<byte_range_info>, std::vector<size_type>>
203 std::span<std::vector<size_type>
const> row_group_indices,
205 cuda::stream_ref stream)
const;
215 [[nodiscard]] std::pair<std::vector<byte_range_info>, std::vector<size_type>>
234 cuda::stream_ref stream)
const;
247 cuda::stream_ref stream,
264 cuda::stream_ref stream,
280 [[nodiscard]] std::pair<std::vector<byte_range_info>, std::vector<size_type>>
305 cuda::stream_ref stream,
321 [[nodiscard]] std::pair<std::vector<byte_range_info>, std::vector<size_type>>
340 [[nodiscard]] std::pair<std::vector<byte_range_info>, std::vector<size_type>>
344 cuda::stream_ref stream)
const;
366 cuda::stream_ref stream,
377 [[nodiscard]] std::pair<std::vector<byte_range_info>, std::vector<size_type>>
396 cuda::stream_ref stream,
417 std::size_t chunk_read_limit,
418 std::size_t pass_read_limit,
424 cuda::stream_ref stream,
459 std::size_t chunk_read_limit,
460 std::size_t pass_read_limit,
466 cuda::stream_ref stream,
487 std::size_t chunk_read_limit,
488 std::size_t pass_read_limit,
493 cuda::stream_ref stream,
524 std::size_t chunk_read_limit,
525 std::size_t pass_read_limit,
529 cuda::stream_ref stream,
558 std::size_t pass_read_limit)
const;
568 std::unique_ptr<detail::hybrid_scan_reader_impl> _impl;
Class and helper functions for specifying a byte range within a data source.
A non-owning, immutable view of device data as a column of elements, some of which may be null as ind...
Multi-file variant of the experimental Hybrid Scan Parquet reader.
void setup_chunking_for_all_columns(std::size_t chunk_read_limit, std::size_t pass_read_limit, cudf::host_span< std::vector< size_type > const > row_group_indices, cudf::host_span< cudf::device_span< uint8_t const > const > column_chunk_data, parquet_reader_options const &options, cuda::stream_ref stream, rmm::device_async_resource_ref mr) const
Setup chunking information for all (or selected) columns and preprocess the input data pages.
std::pair< std::vector< byte_range_info >, std::vector< size_type > > all_column_chunks_byte_ranges(cudf::host_span< std::vector< size_type > const > row_group_indices, parquet_reader_options const &options) const
Get byte ranges of column chunks of all (or selected) columns.
hybrid_scan_multifile(cudf::host_span< FileMetaData const > parquet_metadata, parquet_reader_options const &options)
Constructor for the multi-file experimental Parquet reader.
std::vector< FileMetaData > parquet_metadatas() const
Get parquet metadatas for all sources.
table_with_metadata materialize_all_columns(cudf::host_span< std::vector< size_type > const > row_group_indices, cudf::host_span< cudf::device_span< uint8_t const > const > column_chunk_data, parquet_reader_options const &options, cuda::stream_ref stream, rmm::device_async_resource_ref mr) const
Materializes all (or selected) columns and returns the final output table.
void setup_chunking_for_payload_columns(std::size_t chunk_read_limit, std::size_t pass_read_limit, cudf::host_span< std::vector< size_type > const > row_group_indices, cudf::column_view const &row_mask, use_data_page_mask mask_data_pages, cudf::host_span< cudf::device_span< uint8_t const > const > column_chunk_data, parquet_reader_options const &options, cuda::stream_ref stream, rmm::device_async_resource_ref mr) const
Setup chunking information for payload columns and preprocess the input data pages.
std::vector< std::vector< size_type > > filter_row_groups_with_dictionary_pages(cudf::host_span< cudf::device_span< uint8_t const > const > dictionary_page_data, cudf::host_span< std::vector< size_type > const > row_group_indices, parquet_reader_options const &options, cuda::stream_ref stream) const
Filter the row groups using column chunk dictionary pages.
void setup_chunking_for_payload_columns(std::size_t chunk_read_limit, std::size_t pass_read_limit, cudf::host_span< std::vector< size_type > const > row_group_indices, cudf::column_view const &row_mask, cudf::host_span< cudf::device_span< uint8_t const > const > page_data, parquet_reader_options const &options, cuda::stream_ref stream, rmm::device_async_resource_ref mr) const
Setup chunking information for payload columns and preprocess the input data pages.
bool has_next_table_chunk() const
Check if there is any parquet data left to read for the current chunked setup.
size_type total_rows_in_row_groups(cudf::host_span< std::vector< size_type > const > row_group_indices) const
Get the total number of top-level rows in the per-source row groups.
void reset_column_selection() const
Resets the current column selection.
table_with_metadata materialize_payload_columns(cudf::host_span< std::vector< size_type > const > row_group_indices, cudf::host_span< cudf::device_span< uint8_t const > const > column_chunk_data, cudf::column_view const &row_mask, use_data_page_mask mask_data_pages, parquet_reader_options const &options, cuda::stream_ref stream, rmm::device_async_resource_ref mr) const
Materialize payload columns and applies the row mask to the output table.
table_with_metadata materialize_filter_columns(cudf::host_span< std::vector< size_type > const > row_group_indices, cudf::host_span< cudf::device_span< uint8_t const > const > column_chunk_data, cudf::mutable_column_view &row_mask, use_data_page_mask mask_data_pages, parquet_reader_options const &options, cuda::stream_ref stream, rmm::device_async_resource_ref mr) const
Materializes filter columns and updates the input row mask to only the rows that exist in the output ...
std::vector< std::vector< size_type > > all_row_groups(parquet_reader_options const &options) const
Get all available per-source row group indices from the parquet files.
std::pair< std::vector< byte_range_info >, std::vector< size_type > > bloom_filters_byte_ranges(std::span< std::vector< size_type > const > row_group_indices, parquet_reader_options const &options) const
Get byte ranges of bloom filters for row group pruning.
std::vector< std::vector< size_type > > filter_row_groups_with_stats(cudf::host_span< std::vector< size_type > const > row_group_indices, parquet_reader_options const &options, cuda::stream_ref stream) const
Filter the input row groups using column chunk statistics.
std::unique_ptr< cudf::column > build_all_true_row_mask(cudf::host_span< std::vector< size_type > const > row_group_indices, cuda::stream_ref stream, rmm::device_async_resource_ref mr) const
Builds a boolean survival column of size equal to the total number of rows in the row groups containi...
std::vector< std::vector< size_type > > filter_row_groups_with_byte_range(cudf::host_span< std::vector< size_type > const > row_group_indices, parquet_reader_options const &options) const
Filter the row groups using the byte range specified by [bytes_to_skip, bytes_to_skip + bytes_to_read...
std::vector< byte_range_info > page_index_byte_ranges() const
Get byte ranges of the page index for all sources.
std::vector< std::vector< std::vector< size_type > > > construct_row_group_passes(cudf::host_span< std::vector< size_type > const > row_group_indices, std::size_t pass_read_limit) const
Partition row groups into passes such that the amount of GPU memory required to read,...
std::vector< std::vector< size_type > > filter_row_groups_with_bloom_filters(std::span< cudf::device_span< uint8_t const > const > bloom_filter_data, std::span< std::vector< size_type > const > row_group_indices, parquet_reader_options const &options, cuda::stream_ref stream) const
Filter the row groups using column chunk bloom filters.
table_with_metadata materialize_filter_columns_chunk(cudf::mutable_column_view &row_mask) const
Materializes a chunk of filter columns and updates the corresponding range of input row mask to only ...
void setup_page_indexes(cudf::host_span< cudf::host_span< uint8_t const > const > page_index_bytes) const
Setup the per-source page index within each Parquet file metadata.
hybrid_scan_multifile(std::vector< FileMetaData > &&parquet_metadata, parquet_reader_options const &options)
Constructor that takes ownership of pre-populated Parquet file metadata.
table_with_metadata materialize_payload_columns_chunk(cudf::column_view const &row_mask) const
Materializes a chunk of payload columns and applies the corresponding range of input row mask to the ...
~hybrid_scan_multifile()
Destructor for the multi-file experimental Parquet reader.
std::pair< std::vector< byte_range_info >, std::vector< size_type > > dictionary_pages_byte_ranges(cudf::host_span< std::vector< size_type > const > row_group_indices, parquet_reader_options const &options) const
Get byte ranges of column chunk dictionary pages for row group pruning.
table_with_metadata materialize_all_columns_chunk() const
Materializes a chunk of all (or selected) columns and returns the output table chunk.
std::pair< std::vector< byte_range_info >, std::vector< size_type > > payload_column_chunks_byte_ranges(cudf::host_span< std::vector< size_type > const > row_group_indices, parquet_reader_options const &options) const
Get byte ranges of column chunks of payload columns.
hybrid_scan_multifile(cudf::host_span< cudf::host_span< uint8_t const > const > footer_bytes, parquet_reader_options const &options)
Constructor for the multi-file experimental Parquet reader.
void setup_chunking_for_filter_columns(std::size_t chunk_read_limit, std::size_t pass_read_limit, cudf::host_span< std::vector< size_type > const > row_group_indices, cudf::column_view const &row_mask, use_data_page_mask mask_data_pages, cudf::host_span< cudf::device_span< uint8_t const > const > column_chunk_data, parquet_reader_options const &options, cuda::stream_ref stream, rmm::device_async_resource_ref mr) const
Setup chunking information for filter columns and preprocess the input data pages.
std::pair< std::vector< byte_range_info >, std::vector< size_type > > payload_pages_byte_ranges(cudf::host_span< std::vector< size_type > const > row_group_indices, cudf::column_view const &row_mask, parquet_reader_options const &options, cuda::stream_ref stream) const
Get byte ranges of pages of payload columns.
std::unique_ptr< cudf::column > build_row_mask_with_page_index_stats(cudf::host_span< std::vector< size_type > const > row_group_indices, parquet_reader_options const &options, cuda::stream_ref stream, rmm::device_async_resource_ref mr) const
Builds a boolean column indicating surviving rows using page-level statistics in the page index.
std::pair< std::vector< byte_range_info >, std::vector< size_type > > filter_column_chunks_byte_ranges(cudf::host_span< std::vector< size_type > const > row_group_indices, parquet_reader_options const &options) const
Get byte ranges of column chunks of filter columns.
Settings for read_parquet().
stores offset and size used to indicate a byte range
A non-owning, mutable view of device data as a column of elements, some of which may be null as indic...
use_data_page_mask
Whether to compute and use a page mask using the row mask to skip decompression and decoding of the m...
cuda::mr::resource_ref< cuda::mr::device_accessible > device_async_resource_ref
cuda::std::span< T, Extent > device_span
Device span is an alias of cuda::std::span.
int32_t size_type
Row index type for columns and tables.
Experimental Hybrid Scan Parquet reader optimized for highly selective filters.
Type definitions for the cuDF-IO API.
APIs for reading and writing Parquet files.
Parquet footer schema structs.
Host span, a non-owning view over a contiguous sequence of host-accessible elements.
Type declarations for libcudf.