Table of Contents

Class ReaderProperties

Namespace
ParquetSharp
Assembly
ParquetSharp.dll

Configures options for reading Parquet files.

public sealed class ReaderProperties : IDisposable
Inheritance
ReaderProperties
Implements
Inherited Members

Properties

BufferSize

The size of the buffer (in bytes) used for the buffered stream. This has no effect when the buffered stream is disabled.

public long BufferSize { get; set; }

Property Value

long

FileDecryptionProperties

The FileDecryptionProperties used for reading encrypted files.

public FileDecryptionProperties? FileDecryptionProperties { get; set; }

Property Value

FileDecryptionProperties

FooterReadSize

Get the size used to read the footer from a file.

For high latency file systems and files with large metadata (>64KB) this can increase performance by reducing the number of round-trips to retrieve the entire file metadata.

public long FooterReadSize { get; }

Property Value

long

IsBufferedStreamEnabled

Whether a buffered stream is used for reading.

This limits the size of reads from the underlying file to limit memory usage in resource constrained environments. Using a buffered stream is disabled by default. Note that this has no effect when reading as Arrow data and PreBuffer is enabled.

public bool IsBufferedStreamEnabled { get; }

Property Value

bool

MemoryPool

Get the memory pool that will be used for allocations in the reader.

This can be set when creating the reader properties with WithMemoryPool(MemoryPool).

public MemoryPool MemoryPool { get; }

Property Value

MemoryPool

PageChecksumVerification

Whether page checksums are verified during reading to check for data corruption

public bool PageChecksumVerification { get; }

Property Value

bool

ThriftContainerSizeLimit

Return the size limit on thrift containers.

This limit helps prevent space and time bombs in files, but may need to be increased in order to read files with especially large footers.

public int ThriftContainerSizeLimit { get; }

Property Value

int

ThriftStringSizeLimit

Return the size limit on thrift strings.

This limit helps prevent space and time bombs in files, but may need to be increased in order to read files with especially large headers.

public int ThriftStringSizeLimit { get; }

Property Value

int

Methods

DisableBufferedStream()

Disable using a buffered stream for reading.

public void DisableBufferedStream()

DisablePageChecksumVerification()

Disable page checksum verification during reading to check for data corruption

public void DisablePageChecksumVerification()

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

EnableBufferedStream()

Enable using a buffered stream for reading.

This limits the size of reads from the underlying file to limit memory usage in resource constrained environments. The size of the buffer can be controlled with the BufferSize parameter. Note that this has no effect when reading as Arrow data and PreBuffer is enabled.

public void EnableBufferedStream()

EnablePageChecksumVerification()

Enable page checksum verification during reading to check for data corruption

public void EnablePageChecksumVerification()

GetDefaultReaderProperties()

Create a new ReaderProperties with default values.

public static ReaderProperties GetDefaultReaderProperties()

Returns

ReaderProperties

A new ReaderProperties object with default values.

SetFooterReadSize(long)

Set the size used to read the footer from a file.

public void SetFooterReadSize(long size)

Parameters

size long

SetThriftContainerSizeLimit(int)

Set the size limit on thrift containers.

public void SetThriftContainerSizeLimit(int size)

Parameters

size int

SetThriftStringSizeLimit(int)

Set the size limit on thrift strings.

public void SetThriftStringSizeLimit(int size)

Parameters

size int

WithMemoryPool(MemoryPool)

Create a new ReaderProperties that uses the specified memory pool for allocations in the reader.

public static ReaderProperties WithMemoryPool(MemoryPool memoryPool)

Parameters

memoryPool MemoryPool

Returns

ReaderProperties

A new ReaderProperties object.