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


##########
arrow/compute/exprs/exec.go:
##########
@@ -523,13 +524,17 @@ func execFieldRef(ctx context.Context, e 
*expr.FieldReference, input compute.Exe
        }
 
        dt := out.(compute.ArrayLikeDatum).Type()
-       if !arrow.TypeEqual(dt, expectedType) {
+       valueType := dt
+       if dictType, ok := dt.(*arrow.DictionaryType); ok {
+               valueType = dictType.ValueType

Review Comment:
   A matching `dictionary<float64>` now passes this check, but evaluating 
`is_nan(col)` then panics instead of returning a result. Its unary 
`compareFunction.DispatchBest` falls through to `replaceNullWithOtherType`, 
which unconditionally accesses `vals[1]` (`arrow/compute/utils.go:123`), before 
the executor can decode the dictionary. Handle unary dictionary dispatch before 
the binary-only logic in `arrow/compute/scalar_compare.go`, and add a 
dictionary-float `is_nan` regression test.



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