During planning, Calcite only optimize based on the field input refs, if we 
always keep the alias, there are many cases that can not be promoted. I 
collected some cases that already tracked by the JIRA issue:

[1] https://issues.apache.org/jira/browse/CALCITE-4037
[2] https://issues.apache.org/jira/browse/CALCITE-3662
[3] https://issues.apache.org/jira/browse/CALCITE-1584

Best,
Danny Chan
在 2020年10月21日 +0800 PM2:49,JiaTao Tao <[email protected]>,写道:
> Hi fellows
> I found in some place, we just call `project(Iterable<? extends RexNode>
> nodes) `, but this will lose alias, why don't we try to call
> `project(Iterable<?
> extends RexNode> nodes, Iterable<String> fieldNames) ` to keep alias?
>
> Regards!
>
> Aron Tao

Reply via email to