dwsmith1983 commented on PR #5867:
URL: 
https://github.com/apache/datafusion-comet/pull/5867#issuecomment-6206427999

   > Would it make sense to gate on the item instead of on the ANSI setting?
   
   Yes, you read the gate right, and it is changed in 4fde11bdc. 
`CometArrayAppend` now reports a nullable array with an item other than a 
literal or column as `Incompatible` whatever the ANSI setting, so your 
`IF(...)` repro runs through the dispatcher and raises `INVALID_INDEX_OF_ZERO` 
with ANSI off, and a column or literal item stays native with ANSI on. The 
literal-or-column check is the one `CometArrayContains` and `CometArrayJoin` 
each had, now shared as `EvaluationOrder.isUnobservable`.
   
   The ANSI-off cases are in a new `array_append_null_array_item.sql`, since 
the ANSI file sets the mode for the whole file. It has your repro and the same 
item over a nullable column (both `expect_error_class`), column and literal 
items native, `_1 + 1` dispatched, a non-nullable array staying native and 
raising when the item raises, and a pair sharing the `element_at` that falls 
back. `array_append_ansi_null_array.sql` now expects the column item native and 
adds a NULL literal item. Because the check is on the item's shape, a column 
the analyzer wraps in a widening cast is dispatched too; the description says 
so.
   


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