See my comments in 1584. I think that answers your question. Julian
> On Oct 21, 2020, at 23:35, JiaTao Tao <[email protected]> wrote: > > Hi Danny > Thanks for your reply, can you explain "Calcite only optimize based on the > field input refs, if we always keep the alias, there are many cases that > can not be promoted" a bit? In my mind, alias just field names, doesn't > affect the input refs? > > Regards! > > Aron Tao > > > Danny Chan <[email protected]> 于2020年10月22日周四 上午11:29写道: > >> 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 >>
