cjj2010 commented on code in PR #4912:
URL: https://github.com/apache/calcite/pull/4912#discussion_r3265574248
##########
core/src/test/java/org/apache/calcite/test/SqlToRelConverterTest.java:
##########
@@ -6039,4 +6039,45 @@ void checkUserDefinedOrderByOver(NullCollation
nullCollation) {
final String sql = "select distinct deptno, deptno, empno, 1, 'a' from emp
order by rand(), 1";
sql(sql).ok();
}
+
+ /** Test case of
+ * <a
href="https://issues.apache.org/jira/browse/CALCITE-7085">[CALCITE-7085]
+ * JOIN USING with unqualified common column fails in a conformance where
+ * allowQualifyingCommonColumn is false (e.g. Oracle, Presto)</a>. */
+ @Test void testJoinUsingWithConformanceOracle() {
+ final String sql = "SELECT deptno, name\n"
+ + "FROM emp JOIN dept using (deptno)";
+ sql(sql).withConformance(SqlConformanceEnum.ORACLE_10).ok();
Review Comment:
> do we have any tests which exercise the .fail()?
Yes, there are already comprehensive failure case tests in
SqlValidatorTest.java#L5809-L5826. I'm not sure if additional tests are
necessary
--
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]