Class LogicalReadConverterFactory
- Namespace
- ParquetSharp
- Assembly
- ParquetSharp.dll
Extendable class that handles the mapping between a Parquet physical type and the C# logical type when reading values.
public class LogicalReadConverterFactory
- Inheritance
-
LogicalReadConverterFactory
- Inherited Members
Fields
Default
public static readonly LogicalReadConverterFactory Default
Field Value
Methods
GetConverter<TLogical, TPhysical>(ColumnDescriptor, ColumnChunkMetaData)
Return a converter delegate that converts a TPhysical readonly-span to a TLogical span.
public virtual Delegate GetConverter<TLogical, TPhysical>(ColumnDescriptor columnDescriptor, ColumnChunkMetaData columnChunkMetaData) where TPhysical : unmanaged
Parameters
columnDescriptor
ColumnDescriptorThe descriptor of the column to be converted.
columnChunkMetaData
ColumnChunkMetaDataThe metadata of the column-chunk to be converted.
Returns
- Delegate
A delegate of type LogicalRead<TLogical, TPhysical>.Converter
Type Parameters
TLogical
TPhysical
GetDirectReader<TLogical, TPhysical>()
Return a reader delegate if a TPhysical column reader can directly write into a TLogical span (e.g. float to float, int to uint, etc). Otherwise return null. This is an optimisation to avoid needless memory copies between buffers (i.e. otherwise we have to use the identity converter).
public virtual Delegate? GetDirectReader<TLogical, TPhysical>() where TPhysical : unmanaged
Returns
- Delegate
A delegate of type LogicalRead<TLogical, TPhysical>.DirectReader
Type Parameters
TLogical
TPhysical