NobiGo commented on code in PR #4362:
URL: https://github.com/apache/calcite/pull/4362#discussion_r2148940920
##########
testkit/src/main/java/org/apache/calcite/test/SqlOperatorTest.java:
##########
@@ -16145,6 +16145,41 @@ void testTimestampDiff(boolean coercionEnabled) {
"Values passed to = SOME operator must have compatible types", false);
}
+ /** Test case for
+ * <a
href="https://issues.apache.org/jira/browse/CALCITE-6950">[CALCITE-6950]
+ * Use ANY operator to check if an element exists in an array throws
exception</a>. */
+ @Test void testQuantifyCollectionOperators2() {
+ final SqlOperatorFixture f = fixture();
+ QUANTIFY_OPERATORS.forEach(operator -> f.setFor(operator,
SqlOperatorFixture.VmName.EXPAND));
+
+ f.checkNull("1.0 = some (ARRAY[2,3,null])");
+ f.checkNull("1.0 = some (ARRAY[2,null,3])");
+ f.checkBoolean("1.0 = some (ARRAY[1,2,null])", true);
+ f.checkBoolean("3.0 = some (ARRAY[1,2])", false);
Review Comment:
The test cases always ensure the accuracy of the PR, so I understand your
concern.
--
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]