From d965e355906e8d7f5d20fec404bc426da0f6298a Mon Sep 17 00:00:00 2001 From: Xiangpeng Hao Date: Fri, 26 Jul 2024 12:58:03 -0400 Subject: [PATCH 1/2] better default block size --- datafusion/physical-expr-common/src/binary_view_map.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datafusion/physical-expr-common/src/binary_view_map.rs b/datafusion/physical-expr-common/src/binary_view_map.rs index db4e38501248..afb22b646b73 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, From 58ce106f568ea52c5c89c69a658602d9e0501dcc Mon Sep 17 00:00:00 2001 From: Xiangpeng Hao Date: Fri, 26 Jul 2024 15:07:45 -0400 Subject: [PATCH 2/2] fix related test --- datafusion/physical-expr-common/src/binary_view_map.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datafusion/physical-expr-common/src/binary_view_map.rs b/datafusion/physical-expr-common/src/binary_view_map.rs index afb22b646b73..5412f1b9c26a 100644 --- a/datafusion/physical-expr-common/src/binary_view_map.rs +++ b/datafusion/physical-expr-common/src/binary_view_map.rs @@ -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),