alamb commented on code in PR #24030:
URL: https://github.com/apache/datafusion/pull/24030#discussion_r3693337984


##########
datafusion/functions-aggregate/src/array_agg.rs:
##########
@@ -1741,7 +1741,7 @@ mod tests {
         acc2.update_batch(&[data(["b", "c", "a"])])?;
         acc1 = merge(acc1, acc2)?;
 
-        assert_eq!(acc1.size(), 282);
+        assert_eq!(acc1.size(), 290);

Review Comment:
   Updated this expected size from 282 to 290 because of an upstream arrow-rs 
fix: apache/arrow-rs#10406 ("fix off by one error for slice accounting", commit 
81dce783858cd79eab56eca12dc99bc40b7bf019). That PR corrects 
`ArrayData::get_slice_memory_size()` to count `len + 1` offset-buffer entries 
(instead of `len`) for Utf8/Binary/List/Map arrays, since the offsets buffer 
always has one more entry than the element count. This test merges two 
3-element string arrays, each keeping its own offsets buffer (i32, 
byte_width=4), so the correction adds `2 arrays × 1 extra offset × 4 bytes = 8 
bytes`, matching 290 - 282 exactly. Not a DataFusion accounting regression — 
the sibling tests (`does_not_over_account_memory_distinct`/`_ordered`) are 
unaffected.



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