Class RowBufferSlot
Provides column buffers for a generated row writer batch.
public abstract class RowBufferSlot
- Inheritance
-
RowBufferSlot
- Inherited Members
Remarks
This unstable API supports Plank-generated code and is not intended for direct use by applications.
Constructors
RowBufferSlot(ParquetWriter, RowApiColumnDescriptor[], int)
Initializes a generated buffer slot whose columns can be serialized in parallel.
protected RowBufferSlot(ParquetWriter writer, RowApiColumnDescriptor[] columns, int rowCount)
Parameters
writerParquetWriterThe destination Parquet writer.
columnsRowApiColumnDescriptor[]The generated column descriptors.
rowCountintThe slot's row capacity.
RowBufferSlot(RowGroupWriter, RowApiColumnDescriptor[], int)
Initializes a generated buffer slot that writes directly to a row group.
protected RowBufferSlot(RowGroupWriter rowGroupWriter, RowApiColumnDescriptor[] columns, int rowCount)
Parameters
rowGroupWriterRowGroupWriterThe destination row-group writer.
columnsRowApiColumnDescriptor[]The generated column descriptors.
rowCountintThe slot's row capacity.
Properties
Index
Gets the index at which the generated writer stores the next row.
protected int Index { get; }
Property Value
Methods
EnsureRowAvailable()
Throws if the generated writer has filled this slot.
protected void EnsureRowAvailable()
EstimateValueSize<T>(T, ParquetPhysicalType, uint)
Estimates the buffered size of one generated variable-width value.
protected static ulong EstimateValueSize<T>(T value, ParquetPhysicalType physicalType, uint typeLength)
Parameters
valueTThe value stored for the current row.
physicalTypeParquetPhysicalTypeThe generated Parquet physical type.
typeLengthuintThe generated fixed-length binary size, or zero otherwise.
Returns
- ulong
The estimated number of buffered bytes.
Type Parameters
TThe generated CLR storage type.
GetValues<T>(int)
Gets a typed column array used by the generated writer.
protected T[] GetValues<T>(int columnIndex)
Parameters
columnIndexintThe column index in the generated row schema.
Returns
- T[]
The column's writable value array.
Type Parameters
TThe column's generated CLR value type.
OnBuffersResized()
Refreshes generated typed buffer references after the slot grows.
protected virtual void OnBuffersResized()
RegisterOwner(IDisposable)
Registers a resource to dispose when this slot is reused.
public void RegisterOwner(IDisposable owner)
Parameters
ownerIDisposableThe resource that owns values stored in the slot.