ILuffZhe commented on code in PR #4088:
URL: https://github.com/apache/calcite/pull/4088#discussion_r1898162782
##########
core/src/test/java/org/apache/calcite/test/RelMetadataTest.java:
##########
@@ -1193,6 +1193,27 @@ private void
checkColumnUniquenessForFilterWithConstantColumns(String sql) {
.assertThatUniqueKeysAre(bitSetOf());
}
+ /** Test case for
+ * <a
href="https://issues.apache.org/jira/browse/CALCITE-6727">[CALCITE-6727]
+ * Column uniqueness constrain should only apply to inner join</a>. */
+ @Test void testColumnUniquenessForLeftJoinOnLimit1() {
+ final String sql = ""
+ + "select A.empno as a_empno,\n"
+ + " A.ename as a_ename,\n"
+ + " B.empno as b_empno,\n"
+ + " B.ename as b_ename\n"
Review Comment:
Sorry for asking this, should `b_empno` be unique if this case is `right
join`?
If yes, do you mind adding a test?
--
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]