CALCITE-2227, we will not replace Coalesce to Case When for natural join, when we use ReduceExpressionRule for our plan for Coalesce with constant, the nullability will chage( from nullable to notnull), this will cause VolcanoPlanner to throw error.
Should i fix this? or we should not use this rule in VolcanoPlanner?
This is the error thrown sql :
The plan before ReduceExpressionRule:
The plan after:
We can see that the deptno's nullability changes from nullable to not null. And we encounter an type error when using ReduceExpressionRule in VolcanoPlanner.