pub(crate) struct RecordDecoder {
schema: SchemaRef,
fields: Vec<Decoder>,
use_utf8view: bool,
strict_mode: bool,
}
Expand description
Decodes avro encoded data into [RecordBatch
]
Fields§
§schema: SchemaRef
§fields: Vec<Decoder>
§use_utf8view: bool
§strict_mode: bool
Implementations§
Source§impl RecordDecoder
impl RecordDecoder
Sourcepub(crate) fn new(data_type: &AvroDataType) -> Self
pub(crate) fn new(data_type: &AvroDataType) -> Self
Creates a new RecordDecoderBuilder
for configuring a RecordDecoder
.
Sourcepub(crate) fn try_new(data_type: &AvroDataType) -> Result<Self, ArrowError>
pub(crate) fn try_new(data_type: &AvroDataType) -> Result<Self, ArrowError>
Create a new RecordDecoder
from the provided AvroDataType
with default options
Sourcepub(crate) fn try_new_with_options(
data_type: &AvroDataType,
use_utf8view: bool,
strict_mode: bool,
) -> Result<Self, ArrowError>
pub(crate) fn try_new_with_options( data_type: &AvroDataType, use_utf8view: bool, strict_mode: bool, ) -> Result<Self, ArrowError>
Creates a new RecordDecoder
from the provided AvroDataType
with additional options.
This method allows you to customize how the Avro data is decoded into Arrow arrays.
§Arguments
data_type
- The Avro data type to decode.use_utf8view
- A flag indicating whether to useUtf8View
for string types.strict_mode
- A flag to enable strict decoding, returning an error if the data does not conform to the schema.
§Errors
This function will return an error if the provided data_type
is not a Record
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RecordDecoder
impl RefUnwindSafe for RecordDecoder
impl Send for RecordDecoder
impl Sync for RecordDecoder
impl Unpin for RecordDecoder
impl UnwindSafe for RecordDecoder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more