Parquet IO Utils#
IO utilities for Parquet.
- pylibcudf.io.parquet_io_utils.IOSubmissionPolicy#
See also
io_submission_policy.Enum members
SERIALIZEINTERLEAVE
- pylibcudf.io.parquet_io_utils.fetch_bloom_filters_to_device(
- SourceInfo source_info,
- list byte_ranges,
- io_submission_policy policy,
- stream: CudaStreamLike | None = None,
- DeviceMemoryResource mr=None,
Fetch the bloom filter bitsets of Parquet column chunks into device memory.
Unlike
fetch_byte_ranges_to_device(), the bloom filter headers are removed and every bitset is aligned as required byfilter_row_groups_with_bloom_filters().- Parameters:
- source_infoSourceInfo
Source describing a single Parquet file.
- byte_rangeslist[ByteRangeInfo]
Byte ranges of complete bloom filters, as returned by
bloom_filters_byte_ranges().- policyIOSubmissionPolicy
Whether to serialize I/O submissions from callers.
- streamStream, optional
CUDA stream.
- mrDeviceMemoryResource, optional
Device memory resource.
- Returns:
- list[gpumemoryview]
One view of the bitset per byte range, in the order of
byte_ranges. Each view keeps the allocation that owns its memory alive.
- Raises:
- ValueError
If
source_infodoes not describe exactly one source.
- pylibcudf.io.parquet_io_utils.fetch_byte_ranges_to_device(
- SourceInfo source_info,
- list byte_ranges,
- io_submission_policy policy,
- stream: CudaStreamLike | None = None,
- DeviceMemoryResource mr=None,
Fetch byte ranges from a Parquet source into device memory.
- Parameters:
- source_infoSourceInfo
Source describing a single Parquet file.
- byte_rangeslist[ByteRangeInfo]
Byte ranges to fetch, as returned by
filter_column_chunks_byte_ranges(),payload_column_chunks_byte_ranges(), orall_column_chunks_byte_ranges().- policyIOSubmissionPolicy
Whether to serialize I/O submissions from callers.
- streamStream, optional
CUDA stream.
- mrDeviceMemoryResource, optional
Device memory resource.
- Returns:
- list[gpumemoryview]
One view per byte range. Each view holds a reference to the
DeviceBufferthat owns its memory, keeping the allocation alive for as long as the view is referenced.
- Raises:
- ValueError
If
source_infodoes not describe exactly one source.
- pylibcudf.io.parquet_io_utils.fetch_page_index_to_host(
- SourceInfo source_info,
- ByteRangeInfo page_index_range,
Fetch parquet page index bytes to host memory.
- Parameters:
- source_infoSourceInfo
Source describing a single Parquet file.
- page_index_rangeByteRangeInfo
Byte range of the page index, as returned by
page_index_byte_range().
- Returns:
- bytes
Raw page index bytes copied to Python host memory.
- Raises:
- ValueError
If
source_infodoes not describe exactly one source.