public UnsafeRecordBatchDataReader(RecordBatch recordBatch)
        {
            _schema         = recordBatch.Schema;
            _columnDecoders = SchemaToDecoder.SchemaToDecoders(recordBatch.Schema);

            ReadNewRecordBatch(recordBatch);
        }
Example #2
0
        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());
        }
Example #3
0
 public StructDecoder(StructType structType)
 {
     _names    = structType.Fields.Select(x => x.Name).ToArray();
     _decoders = SchemaToDecoder.FieldsToDecoders(structType.Fields);
 }