mihaibudiu commented on code in PR #3746:
URL: https://github.com/apache/calcite/pull/3746#discussion_r1548795558
##########
testkit/src/main/java/org/apache/calcite/test/SqlOperatorTest.java:
##########
@@ -7126,6 +7126,9 @@ void checkRegexpExtract(SqlOperatorFixture f0,
FunctionAlias functionAlias) {
"Cannot apply 'ARRAYS_OVERLAP' to arguments of type 'ARRAYS_OVERLAP\\("
+ "<INTEGER ARRAY>, <BOOLEAN>\\)'. Supported form\\(s\\):
'ARRAYS_OVERLAP\\("
+ "<EQUIVALENT_TYPE>, <EQUIVALENT_TYPE>\\)'", false);
+ f.checkNull("arrays_overlap(null, null)");
Review Comment:
Whoever wrote that code is confusing the type "NULL" with the type "VOID".
These are not the same thing at all. NULL is a type which has one value,
whereas VOID has no values at all.
So there is at least one bug in their handling of types.
We can also reject this expression at compilation time in Calcite.
What happens if both arrays are NULL?
--
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]