mihaibudiu commented on code in PR #3597:
URL: https://github.com/apache/calcite/pull/3597#discussion_r1438438843


##########
core/src/test/java/org/apache/calcite/test/RelOptRulesTest.java:
##########
@@ -4177,6 +4178,109 @@ RelOptFixture checkDynamicFunctions(boolean 
treatDynamicCallsAsConstant) {
         .check();
   }
 
+  @Test void testJoinWithConstantRowOnRight() {

Review Comment:
   I meant a test like this one: `select e.empno, e.ename, c.* from emp e cross 
join (select 5, NULL) c`
   This test seems to produce an incorrect plan because you just substitute the 
NULL for the corresponding column:
   
   ```
   LogicalProject(EMPNO=[$0], ENAME=[$1], EXPR$0=[$9], EXPR$1=[$10])
     LogicalProject(EMPNO=[$0], ENAME=[$1], JOB=[$2], MGR=[$3], HIREDATE=[$4], 
SAL=[$5], COMM=[$6], DEPTNO=[$7], SLACKER=[$8], $f9=[5], $f10=[null:NULL])
       LogicalTableScan(table=[[CATALOG, SALES, EMP]])
   ```
   
   I believe that the result should be the empty set.



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