pub(crate) struct RecordDecoder {
schema: SchemaRef,
fields: Vec<Decoder>,
projector: Option<Projector>,
}展开描述
将 Avro 编码数据解码为 [RecordBatch]
字段§
§schema: SchemaRef§fields: Vec<Decoder>§projector: Option<Projector>实现§
来源§impl RecordDecoder
impl RecordDecoder
源代码pub(crate) fn try_new_with_options( data_type: &AvroDataType, ) -> Result<Self, ArrowError>
pub(crate) fn try_new_with_options( data_type: &AvroDataType, ) -> Result<Self, ArrowError>
使用提供的 AvroDataType 和额外选项创建一个新的 RecordDecoder。
此方法允许您自定义 Avro 数据如何解码为 Arrow 数组。
§参数
data_type- 要解码的 Avro 数据类型。use_utf8view- 一个标志,指示是否对字符串类型使用Utf8View。
§错误
如果提供的 data_type 不是 Record,此函数将返回错误。