Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
976730a
Added decoder support for Union types and Union resolution.
jecsand838 Sep 15, 2025
1c1e58c
Merge branch 'main' into avro-reader-union-support-decoder
jecsand838 Sep 16, 2025
eb63eb3
Merge branch 'main' into avro-reader-union-support-decoder
jecsand838 Sep 17, 2025
b0e0ee7
Merge branch 'main' into avro-reader-union-support-decoder
jecsand838 Sep 18, 2025
0d81b32
Merge branch 'main' into avro-reader-union-support-decoder
jecsand838 Sep 18, 2025
e08322b
Update arrow-avro/src/reader/record.rs
jecsand838 Sep 20, 2025
ca950ca
Merge branch 'main' into avro-reader-union-support-decoder
jecsand838 Sep 20, 2025
1739751
Update arrow-avro/src/reader/record.rs
jecsand838 Sep 20, 2025
6024029
Update arrow-avro/src/reader/record.rs
jecsand838 Sep 20, 2025
fdeb875
Update arrow-avro/src/reader/record.rs
jecsand838 Sep 20, 2025
79d113c
Update arrow-avro/src/reader/record.rs
jecsand838 Sep 20, 2025
e793445
Update arrow-avro/src/reader/record.rs
jecsand838 Sep 20, 2025
d636451
Update arrow-avro/src/reader/record.rs
jecsand838 Sep 20, 2025
58890ae
Address PR Comments
jecsand838 Sep 21, 2025
5f5787b
Merge branch 'main' into avro-reader-union-support-decoder
jecsand838 Sep 21, 2025
8a53f1a
Address PR Comments
jecsand838 Sep 21, 2025
71cb721
Refactored Union decoding logic into a new `UnionDecoder ` based appr…
jecsand838 Sep 22, 2025
63ffed2
Update arrow-avro/src/reader/record.rs
jecsand838 Sep 22, 2025
34e258f
Update arrow-avro/src/reader/record.rs
jecsand838 Sep 22, 2025
ddde842
Address PR Comments
jecsand838 Sep 22, 2025
d023b49
Merge branch 'main' into avro-reader-union-support-decoder
jecsand838 Sep 22, 2025
2fe36aa
Changed `DispatchLookupTable` type ids to be `i8` instead of `i16`.
jecsand838 Sep 22, 2025
f212a31
Update arrow-avro/src/reader/record.rs
jecsand838 Sep 22, 2025
ebc5a1c
Update arrow-avro/src/reader/record.rs
jecsand838 Sep 22, 2025
761adba
Update arrow-avro/src/reader/record.rs
jecsand838 Sep 22, 2025
20d946f
Address PR Comments
jecsand838 Sep 23, 2025
df78fbc
Merge branch 'main' into avro-reader-union-support-decoder
jecsand838 Sep 23, 2025
ba8c751
Merge branch 'main' into avro-reader-union-support-decoder
jecsand838 Sep 23, 2025
2990e7f
Merge branch 'main' into avro-reader-union-support-decoder
jecsand838 Sep 23, 2025
99971eb
Update arrow-avro/src/reader/record.rs
jecsand838 Sep 23, 2025
26e8e96
Update arrow-avro/src/reader/mod.rs
jecsand838 Sep 23, 2025
f3c97a0
Address PR Comments
jecsand838 Sep 23, 2025
ef5f73d
Merge branch 'main' into avro-reader-union-support-decoder
jecsand838 Sep 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions arrow-avro/src/codec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ use arrow_schema::{DECIMAL32_MAX_PRECISION, DECIMAL64_MAX_PRECISION};
use indexmap::IndexMap;
use serde_json::Value;
use std::collections::{HashMap, HashSet};
use std::fmt;
use std::fmt::Display;
use std::sync::Arc;
use strum_macros::AsRefStr;

Expand Down Expand Up @@ -117,6 +119,22 @@ pub(crate) enum Promotion {
BytesToString,
}

impl Display for Promotion {
fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
Self::Direct => write!(formatter, "Direct"),
Self::IntToLong => write!(formatter, "Int->Long"),
Self::IntToFloat => write!(formatter, "Int->Float"),
Self::IntToDouble => write!(formatter, "Int->Double"),
Self::LongToFloat => write!(formatter, "Long->Float"),
Self::LongToDouble => write!(formatter, "Long->Double"),
Self::FloatToDouble => write!(formatter, "Float->Double"),
Self::StringToBytes => write!(formatter, "String->Bytes"),
Self::BytesToString => write!(formatter, "Bytes->String"),
}
}
}

/// Information required to resolve a writer union against a reader union (or single type).
#[derive(Debug, Clone, PartialEq)]
pub struct ResolvedUnion {
Expand Down
Loading
Loading