Tushar7012 commented on code in PR #20055:
URL: https://github.com/apache/datafusion/pull/20055#discussion_r2742751308


##########
datafusion/physical-expr-common/src/binary_view_map.rs:
##########
@@ -291,8 +291,8 @@ where
 
             // Extract length from the view (first 4 bytes of u128 in 
little-endian)
             let len = view_u128 as u32;
-
             // Check if value already exists
+            let mut value: Option<&[u8]> = None;

Review Comment:
   Good catch — you’re right to flag this.
   
   The intent here was to defer materializing the byte slice until we know it’s 
needed, but the current structure makes that unclear and introduces unnecessary 
indirection.
   
   I’ll refactor this so the slice is explicitly materialized once (at the top 
of the loop) and then reused consistently for both lookup and insertion paths. 
That should make the logic clearer and align better with the original 
optimization goal.
   



-- 
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]

Reply via email to