Class RowReaderCore
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
sourceIParquetReadSourceThe random-access source.
schemaParquetSchemaThe generated row schema.
columnsRowApiColumnDescriptor[]The generated column descriptors.
projectionRowApiColumnDescriptor[]The selected columns, or null for all columns.
optionsRowReaderOptionsThe row reader options.
schemaEvolutionParquetSchemaEvolutionOptionsThe 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
streamStreamThe source stream.
schemaParquetSchemaThe generated row schema.
columnsRowApiColumnDescriptor[]The generated column descriptors.
projectionRowApiColumnDescriptor[]The selected columns, or null for all columns.
optionsRowReaderOptionsThe row reader options.
schemaEvolutionParquetSchemaEvolutionOptionsThe 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
columnRowApiColumnDescriptor<T>The generated property column.
Returns
- RowReaderBinaryValue
The current binary value and its null state.
Type Parameters
TThe 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
columnRowApiNestedColumnDescriptor<TShape, TElement>The generated nested leaf descriptor.
Returns
- TShape
A reference to the current materialized shape.
Type Parameters
TShapeThe generated jagged leaf shape.
TElementThe 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
columnRowApiColumnDescriptor<T>The generated property column.
Returns
- T
A reference to the current value.
Type Parameters
TThe 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
columnIndexintThe generated schema ordinal.
Returns
- T
A reference to the current value.
Type Parameters
TThe 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
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
sourceIParquetReadSourceThe new random-access source.
projectionRowApiColumnDescriptor[]The selected columns, or null for all columns.
schemaEvolutionParquetSchemaEvolutionOptionsAn 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
streamStreamThe new source stream.
projectionRowApiColumnDescriptor[]The selected columns, or null for all columns.
schemaEvolutionParquetSchemaEvolutionOptionsAn optional replacement schema-evolution policy.
ThrowIfNotPositioned()
Throws if the generated reader is not positioned on a row.
public void ThrowIfNotPositioned()