pub struct AvroField {
name: String,
data_type: AvroDataType,
}
Expand description
A named AvroDataType
Fields§
§name: String
§data_type: AvroDataType
Implementations§
Source§impl AvroField
impl AvroField
Sourcepub fn data_type(&self) -> &AvroDataType
pub fn data_type(&self) -> &AvroDataType
Returns the AvroDataType
Sourcepub fn with_utf8view(&self) -> Self
pub fn with_utf8view(&self) -> Self
Returns a new AvroField
with Utf8View support enabled
This will convert any Utf8 codecs to Utf8View codecs. This method is used to enable potential performance optimizations in string-heavy workloads by using Arrow’s StringViewArray data structure.
Returns a new AvroField
with the same structure, but with string types
converted to use Utf8View
instead of Utf8
.
Sourcepub fn name(&self) -> &str
pub fn name(&self) -> &str
Returns the name of this Avro field
This is the field name as defined in the Avro schema. It’s used to identify fields within a record structure.
Sourcepub(crate) fn resolve_from_writer_and_reader<'a>(
writer_schema: &'a Schema<'a>,
reader_schema: &'a Schema<'a>,
use_utf8view: bool,
strict_mode: bool,
) -> Result<Self, ArrowError>
pub(crate) fn resolve_from_writer_and_reader<'a>( writer_schema: &'a Schema<'a>, reader_schema: &'a Schema<'a>, use_utf8view: bool, strict_mode: bool, ) -> Result<Self, ArrowError>
Performs schema resolution between a writer and reader schema.
This is the primary entry point for handling schema evolution. It produces an
AvroField
that contains all the necessary information to read data written
with the writer
schema as if it were written with the reader
schema.