Skip to content
This repository has been archived by the owner on Aug 13, 2024. It is now read-only.

fix: use upstream avro #276

Merged
merged 2 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ resolver = "2"
anyhow = "1"
async-trait = "0.1"
# branch is icelake-dev
apache-avro = { git = "https://github.com/icelake-io/avro.git", branch = "icelake-dev", recv = "4b828e9283e7248fd3ca42f5b590c2160b201785",features = ["derive"] }
apache-avro = { git = "https://github.com/apache/avro.git", recv = "fdab5db0816e28e3e10c87910c8b6f98c33072dc",features = ["derive"] }
arrow-array = { version = ">=50" }
arrow-schema = { version = ">=50" }
arrow-select = { version = ">=50" }
Expand Down
10 changes: 4 additions & 6 deletions icelake/src/types/to_avro.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ impl<'a, 'b> TryFrom<AnyWithFieldId<'a, 'b>> for AvroSchema {
doc: None,
size: Primitive::decimal_required_bytes(*precision as u32)? as usize,
attributes: BTreeMap::default(),
default: None,
})),
}),
Primitive::Date => AvroSchema::Date,
Expand Down Expand Up @@ -161,7 +162,7 @@ impl<'a, 'b> TryFrom<AnyWithFieldId<'a, 'b>> for AvroSchema {

AvroSchema::Map(AvroMapSchema {
types: Box::new(value_avro_schema),
custom_attributes: BTreeMap::from([
attributes: BTreeMap::from([
(
KEY_ID.to_string(),
JsonValue::String(map.key_id.to_string()),
Expand Down Expand Up @@ -207,7 +208,7 @@ impl<'a, 'b> TryFrom<AnyWithFieldId<'a, 'b>> for AvroSchema {
format!("k{}_v{}", map.key_id, map.value_id).as_str(),
vec![key_field, value_field],
))),
custom_attributes: BTreeMap::from([(
attributes: BTreeMap::from([(
LOGICAL_TYPE.to_string(),
JsonValue::String("map".to_string()),
)]),
Expand All @@ -224,10 +225,7 @@ impl<'a, 'b> TryFrom<AnyWithFieldId<'a, 'b>> for AvroSchema {
}
AvroSchema::Array(AvroArraySchema {
items: Box::new(avro_schema),
custom_attributes: BTreeMap::from([(
ELEMENT_ID.to_string(),
list.element_id.into(),
)]),
attributes: BTreeMap::from([(ELEMENT_ID.to_string(), list.element_id.into())]),
})
}
Any::Struct(s) => {
Expand Down
Loading