Tushar7012 commented on code in PR #20055:
URL: https://github.com/apache/datafusion/pull/20055#discussion_r2740377205
##########
datafusion/physical-expr-common/src/binary_view_map.rs:
##########
@@ -291,6 +291,7 @@ where
// Extract length from the view (first 4 bytes of u128 in
little-endian)
let len = view_u128 as u32;
+ let value: &[u8] = values.value(i).as_ref();
Review Comment:
Thanks @Dandandan! You're absolutely right. I've updated the logic to defer
the
value fetch until it's strictly necessary—specifically, only when a long
string (>12 bytes) needs a full byte comparison after a prefix match, or when
we're inserting a new entry. This avoids the values.value(i).as_ref() overhead
for the common case where inline strings are already present in the map. I've
pushed the fix to the PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]