lincoln-lil commented on issue #1354: [CALCITE-482] Implement sql and planner hints URL: https://github.com/apache/calcite/pull/1354#issuecomment-518569831 > 1. `HintStrategy` is not designed to be pluggable, i think no one knows how to make it to be, if you want to support a new node, there needs some modifications(the node and the logic to propagate), then just add a new enum val. > 2. The `HintStrategy` is already kind of `hint` types, is can be used to distinguish what kind of node this hint expects to apply to, what the usage of what you proposed ? > 3. Yes, it is expected, AFAIK, the only usage of `inheritPath` is to resolve conflict when there are multiple same name `hints` for a node. And what do you mean by `broken`, the inherit path is complete (from the root node). 1. How about using the existing `SqlKind` enum for the `HintStrategy`? Then different engines can register their own kind of node for hints propagation strategy. Thus `HintStrategy` can be an abstract class, what do you think? 2. I do not have a strong opinion on the type flag directly in `SqlHint`, using `HintStrategy` to identify the type is ok for me. 3. Yes, the 'inheritPath' for the whole `RelNode` tree can be complete by simple calculating since few `RelNode`s stored the hints.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
