> What if we kill RelNode.getChildExps and add RelNode
> RelNode.accept(RexShuttle shuttle) instead?

+1 That method is very general-purpose. I like it.

It should respect the immutability of RelNodes and return a new
RelNode iff there are changes. Most RelNodes, except sub-classes of
project, filter, join, will just 'return this' right away.

The shuttle must make only very limited changes. Even changing the
output type of an expression should not be allowed. We can relax these
restrictions later, if justified.

On Mon, Nov 24, 2014 at 12:50 AM, Vladimir Sitnikov
<[email protected]> wrote:
>> I don't know when it is safe to combine variables and when you need to 
>> define new ones
> Yes, that is a problem
> What if we kill RelNode.getChildExps and add RelNode
> RelNode.accept(RexShuttle shuttle) instead?
>
> This will result in:
> 1) Method RelNode.getChildExps will become less restrictive
> 2) RexShuttle transformations would become possible for RelNodes
> 3) New method would be consistent with RelNode RelNode.accept(RelShuttle)
> 4) AbstracRelNode.accept(RexShuttle) would be just "return this;".
>
> Vladimir

Reply via email to