Table of Contents

Class LogicalWrite

Namespace
ParquetSharp
Assembly
ParquetSharp.dll

C# types to Parquet physical types write conversion logic. Separate class for per-element conversion logic.

public static class LogicalWrite
Inheritance
LogicalWrite
Inherited Members

Fields

DateTimeOffset

public const long DateTimeOffset = 621355968000000000

Field Value

long

Methods

ConvertByteArray(ReadOnlySpan<byte[]>, Span<short>, Span<ByteArray>, short, ByteBuffer)

public static void ConvertByteArray(ReadOnlySpan<byte[]> source, Span<short> defLevels, Span<ByteArray> destination, short nullLevel, ByteBuffer byteBuffer)

Parameters

source ReadOnlySpan<byte[]>
defLevels Span<short>
destination Span<ByteArray>
nullLevel short
byteBuffer ByteBuffer

ConvertDateOnly(ReadOnlySpan<DateOnly>, Span<int>)

public static void ConvertDateOnly(ReadOnlySpan<DateOnly> source, Span<int> destination)

Parameters

source ReadOnlySpan<DateOnly>
destination Span<int>

ConvertDateOnly(ReadOnlySpan<DateOnly?>, Span<short>, Span<int>, short)

public static void ConvertDateOnly(ReadOnlySpan<DateOnly?> source, Span<short> defLevels, Span<int> destination, short nullLevel)

Parameters

source ReadOnlySpan<DateOnly?>
defLevels Span<short>
destination Span<int>
nullLevel short

ConvertDateTimeMicros(ReadOnlySpan<DateTime>, Span<long>)

public static void ConvertDateTimeMicros(ReadOnlySpan<DateTime> source, Span<long> destination)

Parameters

source ReadOnlySpan<DateTime>
destination Span<long>

ConvertDateTimeMicros(ReadOnlySpan<DateTime?>, Span<short>, Span<long>, short)

public static void ConvertDateTimeMicros(ReadOnlySpan<DateTime?> source, Span<short> defLevels, Span<long> destination, short nullLevel)

Parameters

source ReadOnlySpan<DateTime?>
defLevels Span<short>
destination Span<long>
nullLevel short

ConvertDateTimeMillis(ReadOnlySpan<DateTime>, Span<long>)

public static void ConvertDateTimeMillis(ReadOnlySpan<DateTime> source, Span<long> destination)

Parameters

source ReadOnlySpan<DateTime>
destination Span<long>

ConvertDateTimeMillis(ReadOnlySpan<DateTime?>, Span<short>, Span<long>, short)

public static void ConvertDateTimeMillis(ReadOnlySpan<DateTime?> source, Span<short> defLevels, Span<long> destination, short nullLevel)

Parameters

source ReadOnlySpan<DateTime?>
defLevels Span<short>
destination Span<long>
nullLevel short

ConvertDecimal(ReadOnlySpan<decimal>, Span<FixedLenByteArray>, decimal, ByteBuffer, int)

public static void ConvertDecimal(ReadOnlySpan<decimal> source, Span<FixedLenByteArray> destination, decimal multiplier, ByteBuffer byteBuffer, int typeLength)

Parameters

source ReadOnlySpan<decimal>
destination Span<FixedLenByteArray>
multiplier decimal
byteBuffer ByteBuffer
typeLength int

ConvertDecimal(ReadOnlySpan<decimal>, Span<int>, decimal)

public static void ConvertDecimal(ReadOnlySpan<decimal> source, Span<int> destination, decimal multiplier)

Parameters

source ReadOnlySpan<decimal>
destination Span<int>
multiplier decimal

ConvertDecimal(ReadOnlySpan<decimal>, Span<long>, decimal)

public static void ConvertDecimal(ReadOnlySpan<decimal> source, Span<long> destination, decimal multiplier)

Parameters

source ReadOnlySpan<decimal>
destination Span<long>
multiplier decimal

ConvertDecimal(ReadOnlySpan<decimal?>, Span<short>, Span<FixedLenByteArray>, decimal, short, ByteBuffer, int)

public static void ConvertDecimal(ReadOnlySpan<decimal?> source, Span<short> defLevels, Span<FixedLenByteArray> destination, decimal multiplier, short nullLevel, ByteBuffer byteBuffer, int typeLength)

Parameters

source ReadOnlySpan<decimal?>
defLevels Span<short>
destination Span<FixedLenByteArray>
multiplier decimal
nullLevel short
byteBuffer ByteBuffer
typeLength int

ConvertDecimal(ReadOnlySpan<decimal?>, Span<short>, Span<int>, decimal, short)

public static void ConvertDecimal(ReadOnlySpan<decimal?> source, Span<short> defLevels, Span<int> destination, decimal multiplier, short nullLevel)

Parameters

source ReadOnlySpan<decimal?>
defLevels Span<short>
destination Span<int>
multiplier decimal
nullLevel short

ConvertDecimal(ReadOnlySpan<decimal?>, Span<short>, Span<long>, decimal, short)

public static void ConvertDecimal(ReadOnlySpan<decimal?> source, Span<short> defLevels, Span<long> destination, decimal multiplier, short nullLevel)

Parameters

source ReadOnlySpan<decimal?>
defLevels Span<short>
destination Span<long>
multiplier decimal
nullLevel short

ConvertDecimal128(ReadOnlySpan<decimal>, Span<FixedLenByteArray>, decimal, ByteBuffer)

public static void ConvertDecimal128(ReadOnlySpan<decimal> source, Span<FixedLenByteArray> destination, decimal multiplier, ByteBuffer byteBuffer)

Parameters

source ReadOnlySpan<decimal>
destination Span<FixedLenByteArray>
multiplier decimal
byteBuffer ByteBuffer

ConvertDecimal128(ReadOnlySpan<decimal?>, Span<short>, Span<FixedLenByteArray>, decimal, short, ByteBuffer)

public static void ConvertDecimal128(ReadOnlySpan<decimal?> source, Span<short> defLevels, Span<FixedLenByteArray> destination, decimal multiplier, short nullLevel, ByteBuffer byteBuffer)

Parameters

source ReadOnlySpan<decimal?>
defLevels Span<short>
destination Span<FixedLenByteArray>
multiplier decimal
nullLevel short
byteBuffer ByteBuffer

ConvertHalf(ReadOnlySpan<Half>, Span<FixedLenByteArray>, ByteBuffer)

public static void ConvertHalf(ReadOnlySpan<Half> source, Span<FixedLenByteArray> destination, ByteBuffer byteBuffer)

Parameters

source ReadOnlySpan<Half>
destination Span<FixedLenByteArray>
byteBuffer ByteBuffer

ConvertHalf(ReadOnlySpan<Half?>, Span<short>, Span<FixedLenByteArray>, short, ByteBuffer)

public static void ConvertHalf(ReadOnlySpan<Half?> source, Span<short> defLevels, Span<FixedLenByteArray> destination, short nullLevel, ByteBuffer byteBuffer)

Parameters

source ReadOnlySpan<Half?>
defLevels Span<short>
destination Span<FixedLenByteArray>
nullLevel short
byteBuffer ByteBuffer

ConvertInt16(ReadOnlySpan<short>, Span<int>)

public static void ConvertInt16(ReadOnlySpan<short> source, Span<int> destination)

Parameters

source ReadOnlySpan<short>
destination Span<int>

ConvertInt16(ReadOnlySpan<short?>, Span<short>, Span<int>, short)

public static void ConvertInt16(ReadOnlySpan<short?> source, Span<short> defLevels, Span<int> destination, short nullLevel)

Parameters

source ReadOnlySpan<short?>
defLevels Span<short>
destination Span<int>
nullLevel short

ConvertInt8(ReadOnlySpan<sbyte?>, Span<short>, Span<int>, short)

public static void ConvertInt8(ReadOnlySpan<sbyte?> source, Span<short> defLevels, Span<int> destination, short nullLevel)

Parameters

source ReadOnlySpan<sbyte?>
defLevels Span<short>
destination Span<int>
nullLevel short

ConvertInt8(ReadOnlySpan<sbyte>, Span<int>)

public static void ConvertInt8(ReadOnlySpan<sbyte> source, Span<int> destination)

Parameters

source ReadOnlySpan<sbyte>
destination Span<int>

ConvertNative<TValue>(ReadOnlySpan<TValue?>, Span<short>, Span<TValue>, short)

public static void ConvertNative<TValue>(ReadOnlySpan<TValue?> source, Span<short> defLevels, Span<TValue> destination, short nullLevel) where TValue : struct

Parameters

source ReadOnlySpan<TValue?>
defLevels Span<short>
destination Span<TValue>
nullLevel short

Type Parameters

TValue

ConvertNative<TValue>(ReadOnlySpan<TValue>, Span<TValue>)

public static void ConvertNative<TValue>(ReadOnlySpan<TValue> source, Span<TValue> destination) where TValue : unmanaged

Parameters

source ReadOnlySpan<TValue>
destination Span<TValue>

Type Parameters

TValue

ConvertString(ReadOnlySpan<string>, Span<short>, Span<ByteArray>, short, ByteBuffer)

public static void ConvertString(ReadOnlySpan<string> source, Span<short> defLevels, Span<ByteArray> destination, short nullLevel, ByteBuffer byteBuffer)

Parameters

source ReadOnlySpan<string>
defLevels Span<short>
destination Span<ByteArray>
nullLevel short
byteBuffer ByteBuffer

ConvertTimeOnlyMicros(ReadOnlySpan<TimeOnly?>, Span<short>, Span<long>, short)

public static void ConvertTimeOnlyMicros(ReadOnlySpan<TimeOnly?> source, Span<short> defLevels, Span<long> destination, short nullLevel)

Parameters

source ReadOnlySpan<TimeOnly?>
defLevels Span<short>
destination Span<long>
nullLevel short

ConvertTimeOnlyMicros(ReadOnlySpan<TimeOnly>, Span<long>)

public static void ConvertTimeOnlyMicros(ReadOnlySpan<TimeOnly> source, Span<long> destination)

Parameters

source ReadOnlySpan<TimeOnly>
destination Span<long>

ConvertTimeOnlyMillis(ReadOnlySpan<TimeOnly?>, Span<short>, Span<int>, short)

public static void ConvertTimeOnlyMillis(ReadOnlySpan<TimeOnly?> source, Span<short> defLevels, Span<int> destination, short nullLevel)

Parameters

source ReadOnlySpan<TimeOnly?>
defLevels Span<short>
destination Span<int>
nullLevel short

ConvertTimeOnlyMillis(ReadOnlySpan<TimeOnly>, Span<int>)

public static void ConvertTimeOnlyMillis(ReadOnlySpan<TimeOnly> source, Span<int> destination)

Parameters

source ReadOnlySpan<TimeOnly>
destination Span<int>

ConvertTimeSpanMicros(ReadOnlySpan<TimeSpan?>, Span<short>, Span<long>, short)

public static void ConvertTimeSpanMicros(ReadOnlySpan<TimeSpan?> source, Span<short> defLevels, Span<long> destination, short nullLevel)

Parameters

source ReadOnlySpan<TimeSpan?>
defLevels Span<short>
destination Span<long>
nullLevel short

ConvertTimeSpanMicros(ReadOnlySpan<TimeSpan>, Span<long>)

public static void ConvertTimeSpanMicros(ReadOnlySpan<TimeSpan> source, Span<long> destination)

Parameters

source ReadOnlySpan<TimeSpan>
destination Span<long>

ConvertTimeSpanMillis(ReadOnlySpan<TimeSpan?>, Span<short>, Span<int>, short)

public static void ConvertTimeSpanMillis(ReadOnlySpan<TimeSpan?> source, Span<short> defLevels, Span<int> destination, short nullLevel)

Parameters

source ReadOnlySpan<TimeSpan?>
defLevels Span<short>
destination Span<int>
nullLevel short

ConvertTimeSpanMillis(ReadOnlySpan<TimeSpan>, Span<int>)

public static void ConvertTimeSpanMillis(ReadOnlySpan<TimeSpan> source, Span<int> destination)

Parameters

source ReadOnlySpan<TimeSpan>
destination Span<int>

ConvertUInt16(ReadOnlySpan<ushort?>, Span<short>, Span<int>, short)

public static void ConvertUInt16(ReadOnlySpan<ushort?> source, Span<short> defLevels, Span<int> destination, short nullLevel)

Parameters

source ReadOnlySpan<ushort?>
defLevels Span<short>
destination Span<int>
nullLevel short

ConvertUInt16(ReadOnlySpan<ushort>, Span<int>)

public static void ConvertUInt16(ReadOnlySpan<ushort> source, Span<int> destination)

Parameters

source ReadOnlySpan<ushort>
destination Span<int>

ConvertUInt8(ReadOnlySpan<byte>, Span<int>)

public static void ConvertUInt8(ReadOnlySpan<byte> source, Span<int> destination)

Parameters

source ReadOnlySpan<byte>
destination Span<int>

ConvertUInt8(ReadOnlySpan<byte?>, Span<short>, Span<int>, short)

public static void ConvertUInt8(ReadOnlySpan<byte?> source, Span<short> defLevels, Span<int> destination, short nullLevel)

Parameters

source ReadOnlySpan<byte?>
defLevels Span<short>
destination Span<int>
nullLevel short

ConvertUuid(ReadOnlySpan<Guid>, Span<FixedLenByteArray>, ByteBuffer)

public static void ConvertUuid(ReadOnlySpan<Guid> source, Span<FixedLenByteArray> destination, ByteBuffer byteBuffer)

Parameters

source ReadOnlySpan<Guid>
destination Span<FixedLenByteArray>
byteBuffer ByteBuffer

ConvertUuid(ReadOnlySpan<Guid?>, Span<short>, Span<FixedLenByteArray>, short, ByteBuffer)

public static void ConvertUuid(ReadOnlySpan<Guid?> source, Span<short> defLevels, Span<FixedLenByteArray> destination, short nullLevel, ByteBuffer byteBuffer)

Parameters

source ReadOnlySpan<Guid?>
defLevels Span<short>
destination Span<FixedLenByteArray>
nullLevel short
byteBuffer ByteBuffer

FromByteArray(byte[], ByteBuffer)

public static ByteArray FromByteArray(byte[] array, ByteBuffer byteBuffer)

Parameters

array byte[]
byteBuffer ByteBuffer

Returns

ByteArray

FromDateOnly(DateOnly)

public static int FromDateOnly(DateOnly source)

Parameters

source DateOnly

Returns

int

FromDateTimeMicros(DateTime)

public static long FromDateTimeMicros(DateTime source)

Parameters

source DateTime

Returns

long

FromDateTimeMillis(DateTime)

public static long FromDateTimeMillis(DateTime source)

Parameters

source DateTime

Returns

long

FromDecimal(decimal, decimal, ByteBuffer)

public static FixedLenByteArray FromDecimal(decimal source, decimal multiplier, ByteBuffer byteBuffer)

Parameters

source decimal
multiplier decimal
byteBuffer ByteBuffer

Returns

FixedLenByteArray

FromFixedLength<TValue>(in TValue, ByteBuffer)

public static FixedLenByteArray FromFixedLength<TValue>(in TValue value, ByteBuffer byteBuffer) where TValue : unmanaged

Parameters

value TValue
byteBuffer ByteBuffer

Returns

FixedLenByteArray

Type Parameters

TValue

FromString(string, ByteBuffer)

public static ByteArray FromString(string str, ByteBuffer byteBuffer)

Parameters

str string
byteBuffer ByteBuffer

Returns

ByteArray

FromTimeOnlyMicros(TimeOnly)

public static long FromTimeOnlyMicros(TimeOnly source)

Parameters

source TimeOnly

Returns

long

FromTimeOnlyMillis(TimeOnly)

public static int FromTimeOnlyMillis(TimeOnly source)

Parameters

source TimeOnly

Returns

int

FromTimeSpanMicros(TimeSpan)

public static long FromTimeSpanMicros(TimeSpan source)

Parameters

source TimeSpan

Returns

long

FromTimeSpanMillis(TimeSpan)

public static int FromTimeSpanMillis(TimeSpan source)

Parameters

source TimeSpan

Returns

int

FromUuid(Guid, ByteBuffer)

public static FixedLenByteArray FromUuid(Guid uuid, ByteBuffer byteBuffer)

Parameters

uuid Guid
byteBuffer ByteBuffer

Returns

FixedLenByteArray

GetNativeConverter<TTLogical, TTPhysical>()

public static Delegate GetNativeConverter<TTLogical, TTPhysical>() where TTLogical : unmanaged where TTPhysical : unmanaged

Returns

Delegate

Type Parameters

TTLogical
TTPhysical

GetNullableNativeConverter<TTLogical, TTPhysical>()

public static Delegate GetNullableNativeConverter<TTLogical, TTPhysical>() where TTLogical : unmanaged where TTPhysical : unmanaged

Returns

Delegate

Type Parameters

TTLogical
TTPhysical