julianhyde commented on code in PR #4410:
URL: https://github.com/apache/calcite/pull/4410#discussion_r2144186613


##########
core/src/test/java/org/apache/calcite/test/SqlValidatorTest.java:
##########
@@ -5466,6 +5466,70 @@ private ImmutableList<ImmutableBitSet> 
cube(ImmutableBitSet... sets) {
         .ok();
   }
 
+  /** Test case for
+   * <a 
href="https://issues.apache.org/jira/browse/CALCITE-7051";>[CALCITE-7051]
+   * JOIN with USING does not match the appropriate columns when caseSensitive 
is false</a>. */
+  @Test void testSelectJoinUsingCommonColumnCaseSensitive() {
+
+    sql("select DEPTNO from emp join dept using (DEPTNO)")

Review Comment:
   There is a lot of copy-pasted redundancy in these test cases. Use a helper 
method so that each test becomes ~2 lines, and so that it is more obvious what 
the differences are.
   
   The tests all assume that 'deptno' is the same case in both tables. What if 
it isn't?
   
   And what if one table contains both DEPTNO and deptno?
   
   The tests are all positive tests. I would like to see one or two negative 
tests, to make sure that this algorithm is not making things match that should 
not.



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