Copilot commented on code in PR #1485:
URL: https://github.com/apache/arrow-go/pull/1485#discussion_r4514552050
##########
arrow/compute/exprs/exec.go:
##########
@@ -117,11 +118,11 @@ func makeExecBatch(ctx context.Context, schema
*arrow.Schema, partial compute.Da
// type. for now we'll cast this
val, err = val.CastTo(field.Type)
if err != nil {
- return compute.ExecBatch{}, err
+ return out, err
Review Comment:
`scalar.Struct` and `scalar.RunEndEncoded` have `Release` but no `Retain`,
so `compute.NewDatum` does not retain their children: this new error cleanup
can free a previously added nested field's buffers while the caller still owns
the input. The owning null-struct paths at lines 64, 111 and 125 similarly let
batch cleanup free dictionary children of returned field-reference results. Add
matching retain support (as in #1474), with regression tests for nested-field
cast failures and returned null structs surviving batch cleanup.
--
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]