WinkerDu opened a new issue, #2482:
URL: https://github.com/apache/arrow-datafusion/issues/2482
**Is your feature request related to a problem or challenge? Please describe
what you are trying to do.**
As discuss in #1179 , there is bug when Numeric, String, Boolean comparisons
work with literal `NULL`
**Toproduce**
```
> select * from (VALUES (1, 'foo' ,2.3), (2, 'bar', 5.4)) as t;
+---------+---------+---------+
| column1 | column2 | column3 |
+---------+---------+---------+
| 1 | foo | 2.3 |
| 2 | bar | 5.4 |
+---------+---------+---------+
2 rows in set. Query took 0.004 seconds.
> select column1 < null from (VALUES (1, 'foo' ,2.3), (2, 'bar', 5.4)) as t;
Plan("'Int64 < Utf8' can't be evaluated because there isn't a common type to
coerce the types to")
> select column2 < null from (VALUES (1, 'foo' ,2.3), (2, 'bar', 5.4)) as t;
ArrowError(ExternalError(Internal("compute_utf8_op_scalar for 'lt' failed to
cast literal value NULL")))
> select column3 < null from (VALUES (1, 'foo' ,2.3), (2, 'bar', 5.4)) as t;
Plan("'Float64 < Utf8' can't be evaluated because there isn't a common type
to coerce the types to")
```
**Describe the solution you'd like**
- Introduces `null_coercion` to `comparison_eq_coercion` and
`comparison_order_coercion`
- Enhances binary expression macros to support `NULL` scalar value comparing
with array, like `binary_array_op_dyn_scalar`
--
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]