mihaibudiu commented on code in PR #4362:
URL: https://github.com/apache/calcite/pull/4362#discussion_r2148860823


##########
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:
   I meant that if you add such tests to SqlToRelConverterTest, the xml file 
will show the casts explicitly inserted.
   Alternatively, you can add such tests to a test fixture which unparses and 
then (e.g., RelToSqlConverterTest) we can again see also the explicit casts 
inserted. 
   Sorry for being unclear, but I think it is good to be explicit about the 
checking; here you want to really check that the proper casts are inserted, not 
only that the query is accepted.



-- 
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]

Reply via email to