From 1429ba81803941d5925c6991242800c8ff72f96b Mon Sep 17 00:00:00 2001 From: emcake <3726783+emcake@users.noreply.github.com> Date: Sun, 11 Feb 2024 22:17:45 +0000 Subject: [PATCH 1/2] fix: correct map field names --- crates/core/src/kernel/arrow/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/core/src/kernel/arrow/mod.rs b/crates/core/src/kernel/arrow/mod.rs index ab121ee8a6..f99583aba9 100644 --- a/crates/core/src/kernel/arrow/mod.rs +++ b/crates/core/src/kernel/arrow/mod.rs @@ -14,8 +14,8 @@ pub(crate) mod extract; pub(crate) mod json; const MAP_ROOT_DEFAULT: &str = "entries"; -const MAP_KEY_DEFAULT: &str = "keys"; -const MAP_VALUE_DEFAULT: &str = "values"; +const MAP_KEY_DEFAULT: &str = "key"; +const MAP_VALUE_DEFAULT: &str = "value"; const LIST_ROOT_DEFAULT: &str = "item"; impl TryFrom for ArrowField { From c13216ab2890f78c8a3d4643412e46cc50152a20 Mon Sep 17 00:00:00 2001 From: emcake <3726783+emcake@users.noreply.github.com> Date: Mon, 12 Feb 2024 22:57:59 +0000 Subject: [PATCH 2/2] test --- crates/core/src/kernel/arrow/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/core/src/kernel/arrow/mod.rs b/crates/core/src/kernel/arrow/mod.rs index f99583aba9..99809c9c24 100644 --- a/crates/core/src/kernel/arrow/mod.rs +++ b/crates/core/src/kernel/arrow/mod.rs @@ -846,9 +846,9 @@ mod tests { let entry_offsets_buffer = Buffer::from(entry_offsets.to_byte_slice()); let keys_data = StringArray::from_iter_values(keys); - let keys_field = Arc::new(Field::new("keys", ArrowDataType::Utf8, false)); + let keys_field = Arc::new(Field::new("key", ArrowDataType::Utf8, false)); let values_field = Arc::new(Field::new( - "values", + "value", values.data_type().clone(), values.null_count() > 0, ));