Skip to content

Commit

Permalink
Align Map Arrow datatype derivation with MapArrayDecoder
Browse files Browse the repository at this point in the history
  • Loading branch information
Jefffrey committed Mar 23, 2024
1 parent 0405e23 commit f15848c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -434,12 +434,12 @@ impl DataType {
}
DataType::Map { key, value, .. } => {
let key = key.to_arrow_data_type();
let key = Field::new("key", key, false);
let key = Field::new("keys", key, false);
let value = value.to_arrow_data_type();
let value = Field::new("value", value, true);
let value = Field::new("values", value, true);

let dt = ArrowDataType::Struct(vec![key, value].into());
let dt = Arc::new(Field::new("entries", dt, true));
let dt = Arc::new(Field::new("entries", dt, false));
ArrowDataType::Map(dt, false)
}
DataType::Union { variants, .. } => {
Expand Down

0 comments on commit f15848c

Please sign in to comment.