Table of Contents

Class ColumnWriter<TValue>

Namespace
ParquetSharp
Assembly
ParquetSharp.dll

Strongly-typed writer of physical Parquet values to a single column.

public sealed class ColumnWriter<TValue> : ColumnWriter, IDisposable where TValue : unmanaged

Type Parameters

TValue

The data type of the column.

Inheritance
ColumnWriter<TValue>
Implements
Inherited Members

Properties

ElementType

Get the element Type of the data being written.

public override Type ElementType { get; }

Property Value

Type

Methods

Apply<TReturn>(IColumnWriterVisitor<TReturn>)

Apply a visitor to the column writer.

public override TReturn Apply<TReturn>(IColumnWriterVisitor<TReturn> visitor)

Parameters

visitor IColumnWriterVisitor<TReturn>

The visitor instance.

Returns

TReturn

The result of the visitor operation.

Type Parameters

TReturn

The return type of the visitor.

WriteBatch(int, ReadOnlySpan<short>, ReadOnlySpan<short>, ReadOnlySpan<TValue>)

Write a batch of values to the column with optional definition and repetition levels.

public void WriteBatch(int numValues, ReadOnlySpan<short> defLevels, ReadOnlySpan<short> repLevels, ReadOnlySpan<TValue> values)

Parameters

numValues int

The number of values to write.

defLevels ReadOnlySpan<short>

The definition levels for the values.

repLevels ReadOnlySpan<short>

The repetition levels for the values.

values ReadOnlySpan<TValue>

The values to write.

Remarks

The lengths of defLevels and repLevels must be at least numValues.

Exceptions

ArgumentNullException

Thrown if values is null.

ArgumentOutOfRangeException

Thrown if numValues is larger than the length of defLevels or repLevels.

WriteBatch(ReadOnlySpan<TValue>)

Write a batch of values to the column.

public void WriteBatch(ReadOnlySpan<TValue> values)

Parameters

values ReadOnlySpan<TValue>

The values to write.

WriteBatchSpaced(int, ReadOnlySpan<short>, ReadOnlySpan<short>, ReadOnlySpan<byte>, long, ReadOnlySpan<TValue>)

public void WriteBatchSpaced(int numValues, ReadOnlySpan<short> defLevels, ReadOnlySpan<short> repLevels, ReadOnlySpan<byte> validBits, long validBitsOffset, ReadOnlySpan<TValue> values)

Parameters

numValues int
defLevels ReadOnlySpan<short>
repLevels ReadOnlySpan<short>
validBits ReadOnlySpan<byte>
validBitsOffset long
values ReadOnlySpan<TValue>