In method reduceExpressionsInternal, we get RexExecutor from cluster, it
can be null:
[image: image.png]

But in the outside(reduceExpressions), `final RexExecutor executor =
Util.first(cluster.getPlanner().getExecutor(),
RexUtil.EXECUTOR)`, it can't be null.


And reduceExpressions is the only caller of reduceExpressionsInternal, so I
think this is an inconsistent behavior.

IMHO, we should create RexUtil.EXECUTOR if it is null
in reduceExpressionsInternal, or just get RexExecutor from RexSimplify.
[image: image.png]


Regards!

Aron Tao

Reply via email to