Table of Contents

Class RowBufferSlot

Namespace
Plank.RowApi
Assembly
Plank.dll

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

writer ParquetWriter

The destination Parquet writer.

columns RowApiColumnDescriptor[]

The generated column descriptors.

rowCount int

The 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

rowGroupWriter RowGroupWriter

The destination row-group writer.

columns RowApiColumnDescriptor[]

The generated column descriptors.

rowCount int

The slot's row capacity.

Properties

Index

Gets the index at which the generated writer stores the next row.

protected int Index { get; }

Property Value

int

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

value T

The value stored for the current row.

physicalType ParquetPhysicalType

The generated Parquet physical type.

typeLength uint

The generated fixed-length binary size, or zero otherwise.

Returns

ulong

The estimated number of buffered bytes.

Type Parameters

T

The generated CLR storage type.

GetValues<T>(int)

Gets a typed column array used by the generated writer.

protected T[] GetValues<T>(int columnIndex)

Parameters

columnIndex int

The column index in the generated row schema.

Returns

T[]

The column's writable value array.

Type Parameters

T

The 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

owner IDisposable

The resource that owns values stored in the slot.