amaliujia commented on a change in pull request #2020:
URL: https://github.com/apache/calcite/pull/2020#discussion_r440575715



##########
File path: 
core/src/test/java/org/apache/calcite/test/TypeCoercionConverterTest.java
##########
@@ -61,6 +61,14 @@
         + "from (values (true, true, true))");
   }
 
+  @Test void testNotInOperation() {
+    checkPlanEquals("select\n"
+        + "4 not in ('1', '2', '3') as f0,\n"
+        + "(3, 4) not in (('1', '2')) as f1,\n"
+        + "(2, 3) not in (('1', '2'), ('3', '4')) as f2\n"
+        + "from (values (true, true, true))");

Review comment:
       Trying to understand this test case: 
   
   so it tests if value is coerced and the way to check it is doing not in. For 
example. `4 not in ('1', '2', '3')`. 4 should be coerced to varchar then it is 
not in `('1', '2', '3')`.
   
   Then, I guess what is missing are negative cases. Because seems to me that 
even 4 is not coerced, it will still not in  `('1', '2', '3')`. 
   
   So for each positive case here, there could be a negative case. For example, 
`3 not in ('1', '2', '3')` which returns false.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to