[ https://issues.apache.org/jira/browse/CALCITE-3128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16874480#comment-16874480 ]
Julian Hyde commented on CALCITE-3128: -------------------------------------- Does this problem occur if and only if the condition is always true? I think not. if the condition is '(t1.c is null) = (t2.c is null)', I think the problem would still occur. The key factor, I think, is that one side has just one column, and a null in that column. So I don't thinkĀ {{boolean isConditionAlwaysTrue}} should be part of the solution. > Joining two tables producing only NULLs will return 0 rows > ---------------------------------------------------------- > > Key: CALCITE-3128 > URL: https://issues.apache.org/jira/browse/CALCITE-3128 > Project: Calcite > Issue Type: Bug > Components: core > Affects Versions: 1.20.0 > Reporter: Muhammad Gelbana > Assignee: Danny Chan > Priority: Major > Labels: pull-request-available > Time Spent: 2h 10m > Remaining Estimate: 0h > > The following queries will return 0 rows while they're expected to ruturn > rows with NULLs in them. > {code:sql} > SELECT * > FROM (SELECT NULLIF(5, 5)) a, (SELECT NULLIF(5, 5)) b > {code} > {code:sql} > SELECT * > FROM (VALUES (NULLIF(5, 5)), (NULLIF(5, 5))) a, (VALUES (NULLIF(5, 5)), > (NULLIF(5, 5))) b > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)