By “skeptical” I mean that I think we can come up with a mechanism to copy hints when applying planner rules, but even when we have implemented that mechanism there will be many cases where people want a hint and that hint is not copied to the RelNode where it is needed, and many other cases where we spend the effort/memory of copying the hint to a RelNode and the hint is not used.
By “reversible” I mean if we come up with an API that does not work, how do we change or remove that API without people complaining? Julian > On Oct 15, 2019, at 7:11 PM, Danny Chan <yuzhao....@gmail.com> wrote: > > Thanks Julian > >> I am skeptical that RelWithHint will work for large queries. > > For “skeptical” do you mean how to transfer the hints during rule planning ? > I’m also not that confident yet. > >> How do we introduce it in a reversible way > Do you mean transform the RelWithHint back into the SqlHint ? I didn’t > implement it in current patch, but I think we have the ability to do that > because we have a inheritPath for each RelWithHint, we can collect all the > hints together and merge them into the SqlHints, then propagate these > SqlHints to the SqlNodes. > >> What are the other options? > Do you mean the way to transfer hints during planning ? I have no other > options yet. > > Best, > Danny Chan > 在 2019年10月16日 +0800 AM8:03,dev@calcite.apache.org,写道: >> >> I am skeptical that RelWithHint will work for large queries.