You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2019/08/06 07:07:26 UTC
[GitHub] [calcite] danny0405 commented on issue #1354: [CALCITE-482]
Implement sql and planner hints
danny0405 commented on issue #1354: [CALCITE-482] Implement sql and planner hints
URL: https://github.com/apache/calcite/pull/1354#issuecomment-518536813
> Glad to see your effort driving this long-expected feature! Here're my questions for the overall implementation(Please correct me if I understand incorrectly):
>
> 1. The `HintStrategy` & `HintStrategies` abstraction: I understand this try to make the hint strategy some how pluggable but limited to pre-defined types (`QUERY`, `JOIN`, `TABLE_SCAN` and `PROJECT`) that different engines can not customize it since they may have various requirements. I think we should figure out a more flexible way to target this.
> 2. I like the idea of the two kinds of hints: top-level (query) hint & table hint that most RDBMS vendors support, I'm not sure if necessary to add the `hint` types for current `SqlHint`?
> 3. The `inheritPath` in `RelHint` looks designed to represent the hints inheritance, but in current implementation the hints propagation is incomplete that only `Join`, `TableScan` and `Project` node will store the corresponding hints info, so the `inheritPath` is broken, is it as your expects?
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).
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services