This is an automated email from the ASF dual-hosted git repository.
Rachelint pushed a commit to branch improve-compare-in-view-map-v2
in repository https://gitbox.apache.org/repos/asf/datafusion.git
The following commit(s) were added to refs/heads/improve-compare-in-view-map-v2
by this push:
new dab9253ec3 quick test2.
dab9253ec3 is described below
commit dab9253ec353efbc378e3e9302c8ae570e7e060c
Author: kamille <[email protected]>
AuthorDate: Thu Jul 9 14:22:56 2026 +0800
quick test2.
---
.../physical-expr-common/src/binary_view_map.rs | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/datafusion/physical-expr-common/src/binary_view_map.rs
b/datafusion/physical-expr-common/src/binary_view_map.rs
index 110fd5f761..fb46254059 100644
--- a/datafusion/physical-expr-common/src/binary_view_map.rs
+++ b/datafusion/physical-expr-common/src/binary_view_map.rs
@@ -329,20 +329,24 @@ where
let stored_view =
self.views[header.payload.group_index()];
// Fast path: inline strings can be compared directly
- if len <= 12 {
- return stored_view == view_u128;
- }
+ // if len <= 12 {
+ // return stored_view == view_u128;
+ // }
- // For larger strings: first compare the 4-byte prefix
- let stored_prefix = (stored_view >> 32) as u32;
- let input_prefix = (view_u128 >> 32) as u32;
- if stored_prefix != input_prefix {
- return false;
- }
+ // // For larger strings: first compare the 4-byte
prefix
+ // let stored_prefix = (stored_view >> 32) as u32;
+ // let input_prefix = (view_u128 >> 32) as u32;
+ // if stored_prefix != input_prefix {
+ // return false;
+ // }
// Prefix matched - compare full bytes
let byte_view = ByteView::from(stored_view);
let stored_len = byte_view.length as usize;
+ if stored_len != len as usize {
+ return false;
+ }
+
let buffer_index = byte_view.buffer_index as usize;
let offset = byte_view.offset as usize;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]