Dandandan commented on code in PR #20807:
URL: https://github.com/apache/datafusion/pull/20807#discussion_r2908094404
##########
datafusion/physical-expr-common/src/binary_view_map.rs:
##########
@@ -351,13 +348,16 @@ where
payload
} else {
// no existing value, make a new one
- let payload = make_payload_fn(Some(input_value));
- let new_view = if is_inline {
+ let (payload, new_view) = if is_inline {
+ // Extract inline bytes from view (only for new values)
+ let view_bytes = view_u128.to_le_bytes();
+ let payload = make_payload_fn(Some(&view_bytes[4..4 + len
as usize]));
Review Comment:
it looks like this param to the payload fn is not really used anymore, could
we remove it?
Three actual implementations just ignore the param:
```
fn make_payload_fn(_value: Option<&[u8]>) {}
```
```
|_value| {
// assign new group index on each insert
let group_idx = self.num_groups;
self.num_groups += 1;
group_idx
},
```
```
|_value| {
// assign new group index on each insert
let group_idx = self.num_groups;
self.num_groups += 1;
group_idx
},
```
--
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]