Hi, Jocean shi

The convention is a kind of trait, and not decided by cost model and meratada. 
If you wanna output relNode  with specified trait def, you should passed the 
trait defs to the program. See [1].

[1] 
https://github.com/apache/calcite/blob/ffca956be03a99cd11e440d652b09674aaa727e6/core/src/main/java/org/apache/calcite/tools/Program.java#L38

public interface Program {
 RelNode run(RelOptPlanner planner, RelNode rel,
     RelTraitSet requiredOutputTraits,
     List<RelOptMaterialization> materializations,
     List<RelOptLattice> lattices);
}

Best,
Danny Chan
在 2019年3月14日 +0800 AM10:43,Jocean shi <[email protected]>,写道:
> Hi,
>
> In other world. That question can convert to that if a RelNode has a
> RelSet and the RelSet have two RelSubset then how to chose RelSubset
>
> Best
> Jocean.shi
>
>
>
>
> Stamatis Zampetakis <[email protected]> 于2019年3月13日周三 下午4:09写道:
>
> > Hi Jocean,
> >
> > It is not very clear what is the problem you are trying to solve.
> > Maybe it could help if you could share the input plan, planner rules, and
> > the expected output.
> >
> >
> > Best,
> > Stamatis
> >
> > Στις Τετ, 13 Μαρ 2019 στις 2:51 π.μ., ο/η Yuzhao Chen <
> > [email protected]>
> > έγραψε:
> >
> > > Yeah, did you replace the Convention trait of the matched node when
> > > matches ?
> > >
> > > Best,
> > > Danny Chan
> > > 在 2019年3月12日 +0800 PM8:59,Jocean shi <[email protected]>,写道:
> > > > I sure this ConverterRule matches. In other world, this method has
> > > excuted.
> > > > but the final result is only root RelNode has been replaced.
> > > >
> > > >
> > > > Best
> > > > Jocean.shi
> > >
> >

Reply via email to