silundong opened a new pull request, #4780: URL: https://github.com/apache/calcite/pull/4780
[CALCITE-7402](https://issues.apache.org/jira/browse/CALCITE-7402) When D-elimination is triggered during decorrelation, outer variables are replaced with local attributes and constrained with `IS_NOT_NULL`. The transformation looks like: ``` Filter(condition=[=($0, $cor0.DEPTNO)]) => Filter(condition=[IS_NOT_NULL($0)]) ``` `$0` will later be used to replace `$cor0.DEPTNO`. The rewrite itself is fine, but the type inference of `Filter` does not detect the nullability change implied by the `IS_NOT_NULL` predicate. That is, `$0` is still treated as nullable, which leads to a type mismatch when replacing `$cor0.DEPTNO` later. -- 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]
