Jin Xing created CALCITE-3727:
---------------------------------

             Summary: Deduce nullability of RelDataTypeField for Join
                 Key: CALCITE-3727
                 URL: https://issues.apache.org/jira/browse/CALCITE-3727
             Project: Calcite
          Issue Type: Improvement
            Reporter: Jin Xing


If I have two tables and run a sql like below
{code:java}
table: emps
empno int
deptno int


table:depts
deptno int

select emps.deptno deptno, ... from
emps inner join depts
on emps.deptno = depts.deptno{code}
Its' a very common case that we build star model like above.

Currently row type of the RelNode plan have "isNullable = true" of "deptno" 
column, i.e. Calcite doesn't look into join condition "emps.deptno = 
depts.deptno" and deduce that the result deptno should have "isNullable=false"

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to