pub(crate) struct RecordEncoderBuilder<'a> {
avro_root: &'a AvroField,
arrow_schema: &'a Schema,
fingerprint: Option<Fingerprint>,
}展开描述
RecordEncoder 写入计划的构建器
字段§
§avro_root: &'a AvroField§arrow_schema: &'a Schema§fingerprint: Option<Fingerprint>实现§
源文件§impl<'a> RecordEncoderBuilder<'a>
impl<'a> RecordEncoderBuilder<'a>
源代码pub(crate) fn new( avro_root: &'a AvroField, arrow_schema: &'a ArrowSchema, ) -> Self
pub(crate) fn new( avro_root: &'a AvroField, arrow_schema: &'a ArrowSchema, ) -> Self
从 Avro 根和 Arrow 模式创建一个新的构建器。
pub(crate) fn with_fingerprint(self, fingerprint: Option<Fingerprint>) -> Self
源代码pub(crate) fn build(self) -> Result<RecordEncoder, ArrowError>
pub(crate) fn build(self) -> Result<RecordEncoder, ArrowError>
通过按 Avro 顺序遍历 Avro 记录根,并将每个字段按名称解析为 Arrow 索引,来构建 RecordEncoder。