Hi Julian

When hints were introduced, was that part of the plan?

"hint" is a field in the base class, so the type of the node doesn't matter

public abstract class Project extends SingleRel implements Hintable {
  //~ Instance fields --------------------------------------------------------

  protected final ImmutableList<RexNode> exps;

  protected final ImmutableList<RelHint> hints;


And in RelBuilder#project, we just construct a project without
hints(ImmutableList.of()), so it will lose hints too.

  public RelBuilder project(Iterable<? extends RexNode> nodes,
      Iterable<? extends @Nullable String> fieldNames, boolean force) {
    return project_(nodes, fieldNames, ImmutableList.of(), force);
  }



Regards!

Aron Tao


Julian Hyde <[email protected]> 于2021年5月19日周三 上午12:30写道:

> Do we really need hints in physical operators? When hints were introduced,
> was that part of the plan?
>
> Julian
>
> > On May 17, 2021, at 11:50 PM, JiaTao Tao <[email protected]> wrote:
> >
> > Hi
> > Recently, I'm integrating Calcite's hint into our system, and I've found
> > the Enumerable rules just throw the hint info(ImmutableList.of()) away:
> >
> >  public EnumerableProject(
> >      RelOptCluster cluster,
> >      RelTraitSet traitSet,
> >      RelNode input,
> >      List<? extends RexNode> projects,
> >      RelDataType rowType) {
> >    super(cluster, traitSet, ImmutableList.of(), input, projects,
> rowType);
> >    assert getConvention() instanceof EnumerableConvention;
> >  }
> >
> >
> > Regards!
> >
> > Aron Tao
>

Reply via email to