haohuaijin commented on code in PR #8957:
URL: https://github.com/apache/arrow-datafusion/pull/8957#discussion_r1463345264
##########
datafusion/sqllogictest/test_files/scalar.slt:
##########
@@ -1527,15 +1527,15 @@ SELECT not(true), not(false)
----
false true
-query error DataFusion error: Optimizer rule 'simplify_expressions'
failed\ncaused by\nInternal error: NOT 'Literal \{ value: Int64\(1\) \}' can't
be evaluated because the expression's type is Int64, not boolean or NULL
+query error
SELECT not(1), not(0)
query ?B
SELECT null, not(null)
----
NULL NULL
-query error DataFusion error: Optimizer rule 'simplify_expressions'
failed\ncaused by\nInternal error: NOT 'Literal \{ value: Utf8\("hi"\) \}'
can't be evaluated because the expression's type is Utf8, not boolean or NULL
+query error
Review Comment:
remove the detailed error message because this query return internal error,
that make ci failed
```
❯ select not('hi');
Internal error: NOT 'Literal { value: Utf8("hi") }' can't be evaluated
because the expression's type is Utf8, not boolean or NULL.
This was likely caused by a bug in DataFusion's code and we would welcome
that you file an bug report in our issue tracker
❯ select 1 and 2;
Error during planning: Cannot infer common argument type for logical boolean
operation Int64 AND Int64
```
I think the return error message should like `And` operator, they both only
work for boolean value.
--
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]