walterddr commented on code in PR #10739:
URL: https://github.com/apache/pinot/pull/10739#discussion_r1188068362
##########
pinot-common/src/test/java/org/apache/pinot/sql/parsers/CalciteSqlCompilerTest.java:
##########
@@ -3138,6 +3138,14 @@ public void testExtractTableNamesFromNode() {
Assert.assertEquals(tableNames.get(1), "tbl2");
Assert.assertEquals(tableNames.get(2), "tbl3");
Assert.assertEquals(tableNames.get(3), "tbl4");
+
+ // test for self join queries
+ query = "SELECT tbl1.a FROM tbl1 JOIN(SELECT a FROM tbl1) as self ON
tbl1.a=self.a ";
Review Comment:
technically the problem is not with self join but with the fact that JOIN
implicit table with `AS alias` after the table definition.
can you also add a test with non self join. e.g. the same query but instead
of both from tbl1, get one from tbl1 and one from tbl2?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]