pyarrow.dataset.ParquetFragmentScanOptions#
- class pyarrow.dataset.ParquetFragmentScanOptions(bool use_buffered_stream=False, *, buffer_size=8192, bool pre_buffer=True, cache_options=None, thrift_string_size_limit=None, thrift_container_size_limit=None, decryption_config=None, decryption_properties=None, bool page_checksum_verification=False, bool arrow_extensions_enabled=False)#
Bases:
FragmentScanOptionsParquet 片段的扫描特定选项。
- 参数:
- use_buffered_streambool, default
False 通过缓冲输入流读取文件,而不是一次性加载整个行组。启用此选项可减少内存开销。默认禁用。
- buffer_size
int, default 8192 如果启用,缓冲流的大小。默认为 8KB。
- pre_bufferbool, 默认值
True 如果启用,预先缓冲原始 Parquet 数据,而不是为每个列块发出一次读取。通过使用后台 I/O 线程池并行合并和发出文件读取,这可以提高高延迟文件系统(例如 S3、GCS)的性能。如果你想优先考虑最小内存使用量而不是最大速度,请设置为 False。
- cache_options
pyarrow.CacheOptions, defaultNone 启用 pre_buffer 时使用的缓存选项。默认值应该适用于大多数用例。例如,如果文件系统延迟极高,你可能需要调整这些值。
- thrift_string_size_limit
int, 默认值None 如果不是 None,则覆盖解码 Thrift 结构时分配的最大总字符串大小。默认限制应足以满足大多数 Parquet 文件的需求。
- thrift_container_size_limit
int, 默认值None 如果不是 None,则覆盖解码 Thrift 结构时分配的最大容器总大小。默认限制应足以满足大多数 Parquet 文件的需求。
- decryption_config
pyarrow.dataset.ParquetDecryptionConfig, defaultNone 如果不为 None,则使用提供的 ParquetDecryptionConfig 来解密 Parquet 文件。
- decryption_properties
pyarrow.parquet.FileDecryptionProperties, defaultNone 如果不为 None,则使用提供的 FileDecryptionProperties 来解密加密的 Parquet 文件。
- page_checksum_verificationbool, 默认值
False 如果为 True,则验证从文件中读取的每个页面的页面校验和。
- arrow_extensions_enabledbool, default
False 如果为 True,则尽可能将 Parquet 逻辑类型读取为 Arrow 扩展类型(例如,将 JSON 读取为规范的 arrow.json 扩展类型,或将 UUID 读取为规范的 arrow.uuid 扩展类型)。
- use_buffered_streambool, default
- __init__(*args, **kwargs)#
方法
属性
- arrow_extensions_enabled#
- buffer_size#
- cache_options#
- decryption_properties#
- equals(self, ParquetFragmentScanOptions other)#
- 参数:
- 返回:
- page_checksum_verification#
- parquet_decryption_config#
- pre_buffer#
- thrift_container_size_limit#
- thrift_string_size_limit#
- type_name#
- use_buffered_stream#