Copilot commented on code in PR #1490:
URL: https://github.com/apache/arrow-go/pull/1490#discussion_r4516130578


##########
arrow/scalar/append.go:
##########
@@ -155,6 +155,8 @@ func appendToBldr(bldr array.Builder, scalars []Scalar) 
error {
                appendBinary(bldr, scalars)
        case *array.BinaryBuilder:
                appendBinary(bldr, scalars)
+       case *array.BinaryViewBuilder:
+               appendBinary(bldr, scalars)

Review Comment:
   `appendBinary` counts inline view values in its `ReserveData` total, so 
appending a single `"hello"` binary-view scalar allocates an unused 32 KiB 
overflow buffer that the resulting array retains. Larger inline-only batches 
reserve unused space proportional to their combined payload. Count only 
out-of-line bytes for view builders in the shared helper; this also fixes 
string views routed through `StringLikeBuilder` at line 154.



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

Reply via email to