public UnsafeRecordBatchDataReader(RecordBatch recordBatch) { _schema = recordBatch.Schema; _columnDecoders = SchemaToDecoder.SchemaToDecoders(recordBatch.Schema); ReadNewRecordBatch(recordBatch); }
public ListDecoder(ListType listType) { if (listType.Fields.Count != 1) { throw new ArgumentException("List type contains more than 1 field.", nameof(listType)); } _childDecoder = SchemaToDecoder.FieldsToDecoders(listType.Fields).First(); _listType = typeof(List <>).MakeGenericType(_childDecoder.GetFieldType()); }
public StructDecoder(StructType structType) { _names = structType.Fields.Select(x => x.Name).ToArray(); _decoders = SchemaToDecoder.FieldsToDecoders(structType.Fields); }