Some rules we use `RelBuilder project(Iterable<? extends RexNode> nodes) `,
sometimes use `RelBuilder project(Iterable<? extends RexNode> nodes,
Iterable<String>
fieldNames)`,  and this really makes me confused.


Regards!

Aron Tao


JiaTao Tao <[email protected]> 于2020年10月22日周四 下午4:13写道:

> Thanks, Julian
> One more question is that I can see many
> RelBuilder#project(java.lang.Iterable<? extends
> org.apache.calcite.rex.RexNode>, java.lang.Iterable<java.lang.String>)
> calling in some rules, does this meets the expect, if we don't want to keep
> alias in optimizer.
>
>
> Regards!
>
> Aron Tao
>
>
> Julian Hyde <[email protected]> 于2020年10月22日周四 下午3:29写道:
>
>> 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
>> >>
>>
>

Reply via email to