Table of Contents

Class RowReaderCore

Namespace
Plank.RowApi
Assembly
Plank.dll

Provides the column-oriented reading core used by generated row readers.

public sealed class RowReaderCore : IDisposable
Inheritance
RowReaderCore
Implements
Inherited Members

Remarks

This unstable API supports Plank-generated code and is not intended for direct use by applications.

Constructors

RowReaderCore(IParquetReadSource, ParquetSchema, RowApiColumnDescriptor[], RowApiColumnDescriptor[]?, RowReaderOptions, ParquetSchemaEvolutionOptions?)

Initializes a generated row reader over a random-access source.

public RowReaderCore(IParquetReadSource source, ParquetSchema schema, RowApiColumnDescriptor[] columns, RowApiColumnDescriptor[]? projection, RowReaderOptions options, ParquetSchemaEvolutionOptions? schemaEvolution)

Parameters

source IParquetReadSource

The random-access source.

schema ParquetSchema

The generated row schema.

columns RowApiColumnDescriptor[]

The generated column descriptors.

projection RowApiColumnDescriptor[]

The selected columns, or null for all columns.

options RowReaderOptions

The row reader options.

schemaEvolution ParquetSchemaEvolutionOptions

The optional schema-evolution policy.

RowReaderCore(Stream, ParquetSchema, RowApiColumnDescriptor[], RowApiColumnDescriptor[]?, RowReaderOptions, ParquetSchemaEvolutionOptions?)

Initializes a generated row reader over a stream.

public RowReaderCore(Stream stream, ParquetSchema schema, RowApiColumnDescriptor[] columns, RowApiColumnDescriptor[]? projection, RowReaderOptions options, ParquetSchemaEvolutionOptions? schemaEvolution)

Parameters

stream Stream

The source stream.

schema ParquetSchema

The generated row schema.

columns RowApiColumnDescriptor[]

The generated column descriptors.

projection RowApiColumnDescriptor[]

The selected columns, or null for all columns.

options RowReaderOptions

The row reader options.

schemaEvolution ParquetSchemaEvolutionOptions

The optional schema-evolution policy.

Methods

Dispose()

Releases resources owned by the generated row reader core.

public void Dispose()

GetCurrentBinary<T>(RowApiColumnDescriptor<T>)

Gets the current zero-copy value for a variable-length byte column.

public RowReaderBinaryValue GetCurrentBinary<T>(RowApiColumnDescriptor<T> column)

Parameters

column RowApiColumnDescriptor<T>

The generated property column.

Returns

RowReaderBinaryValue

The current binary value and its null state.

Type Parameters

T

The column's generated CLR binary type.

GetCurrentNested<TShape, TElement>(RowApiNestedColumnDescriptor<TShape, TElement>)

Gets an allocating generated nested property's current leaf shape.

public ref TShape GetCurrentNested<TShape, TElement>(RowApiNestedColumnDescriptor<TShape, TElement> column)

Parameters

column RowApiNestedColumnDescriptor<TShape, TElement>

The generated nested leaf descriptor.

Returns

TShape

A reference to the current materialized shape.

Type Parameters

TShape

The generated jagged leaf shape.

TElement

The dense physical leaf value type.

GetCurrent<T>(RowApiColumnDescriptor<T>)

Gets a generated property's current value.

public ref T GetCurrent<T>(RowApiColumnDescriptor<T> column)

Parameters

column RowApiColumnDescriptor<T>

The generated property column.

Returns

T

A reference to the current value.

Type Parameters

T

The column's generated CLR value type.

GetCurrent<T>(int)

Gets a generated property's current value by its schema ordinal.

public ref T GetCurrent<T>(int columnIndex)

Parameters

columnIndex int

The generated schema ordinal.

Returns

T

A reference to the current value.

Type Parameters

T

The column's generated CLR value type.

Remarks

The source generator supplies an ordinal and type validated when the reader is constructed.

MoveNext()

Advances the generated reader to the next row.

public bool MoveNext()

Returns

bool

true when a row is available; otherwise, false.

Reset(IParquetReadSource, RowApiColumnDescriptor[]?, ParquetSchemaEvolutionOptions?)

Resets the generated row reader to a random-access source and projection.

public void Reset(IParquetReadSource source, RowApiColumnDescriptor[]? projection, ParquetSchemaEvolutionOptions? schemaEvolution = null)

Parameters

source IParquetReadSource

The new random-access source.

projection RowApiColumnDescriptor[]

The selected columns, or null for all columns.

schemaEvolution ParquetSchemaEvolutionOptions

An optional replacement schema-evolution policy.

Reset(Stream, RowApiColumnDescriptor[]?, ParquetSchemaEvolutionOptions?)

Resets the generated row reader to a stream and projection.

public void Reset(Stream stream, RowApiColumnDescriptor[]? projection, ParquetSchemaEvolutionOptions? schemaEvolution = null)

Parameters

stream Stream

The new source stream.

projection RowApiColumnDescriptor[]

The selected columns, or null for all columns.

schemaEvolution ParquetSchemaEvolutionOptions

An optional replacement schema-evolution policy.

ThrowIfNotPositioned()

Throws if the generated reader is not positioned on a row.

public void ThrowIfNotPositioned()