2010YOUY01 opened a new issue, #11872:
URL: https://github.com/apache/datafusion/issues/11872
### Describe the bug
`ILIKE` string operator is not working for `NULL` literal, see reproducer in
datafusion-cli
```
DataFusion CLI v40.0.0
> select ((NULL) NOT ILIKE (NULL));
Arrow error: Invalid argument error: Invalid string operation: Null NILIKE
Null
```
However, the same query is supported if null is a value within the table,
it's better to keep the behaviour consistent
```
> create table t1(v1 text, v2 text);
0 row(s) fetched.
Elapsed 0.020 seconds.
> insert into t1 values ('foo', 'foo'), (null, null), ('foo', 'bar');
+-------+
| count |
+-------+
| 3 |
+-------+
1 row(s) fetched.
Elapsed 0.031 seconds.
> select v1 not ilike v2 from t1;
+-----------------------+
| t1.v1 NOT ILIKE t1.v2 |
+-----------------------+
| false |
| |
| true |
+-----------------------+
3 row(s) fetched.
Elapsed 0.013 seconds.
```
### To Reproduce
_No response_
### Expected behavior
_No response_
### Additional context
Found by SQLancer https://github.com/apache/datafusion/issues/11030
--
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]