Expand description
Avro Decoder for Arrow types.
Re-exportsΒ§
use crate::codec::AvroDataType;πuse crate::codec::AvroLiteral;πuse crate::codec::Codec;πuse crate::codec::EnumMapping;πuse crate::codec::Promotion;πuse crate::codec::ResolutionInfo;πuse crate::codec::ResolvedField;πuse crate::codec::ResolvedRecord;πuse crate::codec::ResolvedUnion;πuse crate::codec::Tz;πuse crate::errors::AvroError;πuse crate::reader::cursor::AvroCursor;πuse crate::schema::Nullability;πuse arrow_array::builder::Decimal32Builder;πuse arrow_array::builder::Decimal64Builder;πuse arrow_array::builder::Decimal128Builder;πuse arrow_array::builder::Decimal256Builder;πuse arrow_array::builder::IntervalMonthDayNanoBuilder;πuse arrow_schema::DECIMAL32_MAX_PRECISION;πuse arrow_schema::DECIMAL64_MAX_PRECISION;πuse arrow_schema::DECIMAL128_MAX_PRECISION;πuse arrow_schema::DECIMAL256_MAX_PRECISION;πuse arrow_schema::DataType;πuse arrow_schema::Field as ArrowField;πuse arrow_schema::FieldRef;πuse arrow_schema::Fields;πuse arrow_schema::Schema as ArrowSchema;πuse arrow_schema::SchemaRef;πuse arrow_schema::UnionFields;πuse arrow_schema::UnionMode;πuse arrow_select::take::TakeOptions;πuse arrow_select::take::take;πuse strum_macros::AsRefStr;πuse uuid::Uuid;πuse std::cmp::Ordering;πuse std::mem;πuse std::sync::Arc;πuse arrow_array::types::*;πuse arrow_array::*;πuse arrow_buffer::*;π
MacrosΒ§
- append_
decimal_ πdefault - Macro to append a default decimal value from twoβs-complement big-endian bytes into the corresponding decimal builder, with compile-time constructed error text.
- decode_
decimal π - Macro to decode a decimal payload for a given width and integer type.
- flush_
decimal π - Macro to finish a decimal builder into an array with precision/scale and nulls.
StructsΒ§
- Dispatch
Lookup πTable - Enum
Resolution π - Nullable
Decoder π - Projector π
- Projector
Builder π - Record
Decoder π - Decodes avro encoded data into [
RecordBatch] - Union
Decoder π - Union
Decoder πBranches - Union
Decoder πBuilder
EnumsΒ§
- Decoder π
- Field
Projection π - Negative
Block πBehavior - Nullable
Plan π - Runtime plan for decoding reader-side
["null", T]types. - Resolution
Plan π - Runtime plan for resolving writer-reader type differences.
- Skipper π
- Lightweight skipper for nonβprojected writer fields (fields present in the writer schema but omitted by the reader/projection); per Avro 1.11.1 schema resolution these fields are ignored.
- Union
Read πPlan
ConstantsΒ§
- DEFAULT_
CAPACITY π - NO_
SOURCE π
FunctionsΒ§
- flush_
dict π - flush_
offsets π - flush_
primitive π - flush_
values π - process_
block_ πitems - Decode
countitems, capping the running total ati32::MAX(the largest index an Arrow list/map offset holds). Otherwise a craftedi64::MAXcount of a zero-byte item likenullspins the loop forever (#10235); byte-consuming items self-terminate on cursor exhaustion, so valid blocks (includingarray<null>) are unaffected. - process_
blockwise π - read_
blocks π - read_
decimal_ πbytes_ be - sign_
cast_ πto - Sign-extend or (when larger) validate-and-truncate a big-endian twoβs-complement
integer into exactly
Nbytes. This matches Avroβs decimal binary encoding: the payload is a big-endian twoβs-complement integer, and when narrowing it must be representable without changing sign or value. - skip_
blocks π - values_
equal_ πat