From 6acf8bb88b21febf35cac1fb15b6beae888cc843 Mon Sep 17 00:00:00 2001 From: Liang-Chi Hsieh Date: Sun, 17 Dec 2023 14:04:27 -0800 Subject: [PATCH] Rename to `entries`. --- arrow-array/src/builder/map_builder.rs | 2 +- arrow/tests/array_transform.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arrow-array/src/builder/map_builder.rs b/arrow-array/src/builder/map_builder.rs index 4109b0f45d30..edc45c2c23b7 100644 --- a/arrow-array/src/builder/map_builder.rs +++ b/arrow-array/src/builder/map_builder.rs @@ -120,7 +120,7 @@ impl MapBuilder { } /// Returns both the key and value array builders of the map - pub fn keys_and_values(&mut self) -> (&mut K, &mut V) { + pub fn entries(&mut self) -> (&mut K, &mut V) { (&mut self.key_builder, &mut self.value_builder) } diff --git a/arrow/tests/array_transform.rs b/arrow/tests/array_transform.rs index 4a37c5d74cee..5a267c876d6a 100644 --- a/arrow/tests/array_transform.rs +++ b/arrow/tests/array_transform.rs @@ -837,12 +837,12 @@ fn test_map_keys_values_append() { Int64Builder::with_capacity(32), Int64Builder::with_capacity(32), ); - let (keys, values) = builder.keys_and_values(); + let (keys, values) = builder.entries(); keys.append_slice(&[1, 2, 3]); values.append_slice(&[1, 3, 4]); builder.append(true).unwrap(); - let (keys, values) = builder.keys_and_values(); + let (keys, values) = builder.entries(); keys.append_slice(&[4, 5]); values.append_slice(&[4, 6]); builder.append(true).unwrap();