From 569071294fbb0898c392bf3e03f255a49a5e99e1 Mon Sep 17 00:00:00 2001 From: Xiangpeng Hao Date: Sat, 27 Jul 2024 07:03:27 -0400 Subject: [PATCH] Increase ByteViewMap block size to 2MB (#11674) * better default block size * fix related test --- datafusion/physical-expr-common/src/binary_view_map.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/datafusion/physical-expr-common/src/binary_view_map.rs b/datafusion/physical-expr-common/src/binary_view_map.rs index 26db0decb189..18bc6801aa60 100644 --- a/datafusion/physical-expr-common/src/binary_view_map.rs +++ b/datafusion/physical-expr-common/src/binary_view_map.rs @@ -149,7 +149,7 @@ where output_type, map: hashbrown::raw::RawTable::with_capacity(INITIAL_MAP_CAPACITY), map_size: 0, - builder: GenericByteViewBuilder::new(), + builder: GenericByteViewBuilder::new().with_block_size(2 * 1024 * 1024), random_state: RandomState::new(), hashes_buffer: vec![], null: None, @@ -545,7 +545,7 @@ mod tests { // Much larger strings in strings2 let strings2 = StringViewArray::from(vec![ "FOO".repeat(1000), - "BAR larger than 12 bytes.".repeat(1000), + "BAR larger than 12 bytes.".repeat(100_000), "more unique.".repeat(1000), "more unique2.".repeat(1000), "FOO".repeat(3000),