As I said in https://issues.apache.org/jira/browse/CALCITE-4833 <https://issues.apache.org/jira/browse/CALCITE-4833>, the PR does not solve the whole problem, in fact solves only a very special case of the problem, and therefore we should not accept it.
Bug 4833 is valid. I’m sure that there are similar cases, such as SELECT t1.empid FROM emps t1 LEFT JOIN emps t2 ON (SELECT t2.empid + 1)<=100 SELECT t1.empid FROM emps t1 LEFT JOIN emps t2 ON (SELECT t2.empid FROM dept)<=100 SELECT t1.empid FROM emps t1 LEFT JOIN emps t2 ON (SELECT MIN(deptno) FROM dept WHERE deptno > t2.empid)<=100 that are caused by the bug and are not fixed by the PR. If a PR solves all such cases we should accept it. I encourage Calcite contributors to fix the bug or help Evgeny to fix the bug. Julian > On Oct 19, 2021, at 4:42 AM, stanilovsky evgeny <estanilovs...@gridgain.com> > wrote: > > Hi calciters ! Look [1] introduces "Support SELECT without FROM syntax" such > syntax can be used with join queries, i.e. SELECT t1.empid FROM emps t1 LEFT > JOIN emps t2 ON (SELECT t2.empid)<=100 > Can anyone review fix or reject it, or reject this lexical construction at > all, thus i can close the ticket with clear soul ) > thanks ! > > [1] https://issues.apache.org/jira/browse/CALCITE-1120 > [2] https://issues.apache.org/jira/browse/CALCITE-4833 > >> fixed: gc pressure part still need to additional time, revert this part, all >> other waiting for review. >> >>> Guys i found that some kinds of nested subqueries are failed [1]. >>> i.e. SELECT t1.empid FROM emps t1 LEFT JOIN emps t2 ON (SELECT >>> t2.empid)<=100 >>> Fix a little bit hack as for me, but all tests are done. >>> Additionally i fix some redundant gc pressure a bit. >>> Plz make a review. >>> >>> thanks ! >>> >>> [1] https://issues.apache.org/jira/browse/CALCITE-4833