You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Vladimir Sitnikov (Jira)" <ji...@apache.org> on 2020/01/13 12:46:00 UTC
[jira] [Comment Edited] (CALCITE-482) Implement SQL and planner
hints
[ https://issues.apache.org/jira/browse/CALCITE-482?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17014287#comment-17014287 ]
Vladimir Sitnikov edited comment on CALCITE-482 at 1/13/20 12:45 PM:
---------------------------------------------------------------------
What I mean is CALCITE-482 created an inconsistency in the API.
Previously there were two arguments: transformTo(RelNode rel, Map<RelNode, RelNode> equiv), and both arguments (RelNode and Map) were consistent. RelNode argument was just like a shortcut for the case when only a single equivalence needs to be registered.
Now you add {{BiFunction<RelNode, RelNode, RelNode> handler}} function that applies to one of the arguments only, and it completely ignores {{Map<RelNode, RelNode>}}
That does not sound right.
Re BiFunction. Have you considered creating a named interface to express the meaning of the parameter?
Frankly speaking, {{BiFunction<RelNode, RelNode, RelNode> handler}} is really confusing (both interface naming and parameter naming).
was (Author: vladimirsitnikov):
What I mean is CALCITE-482 created an inconsistency in the API.
Previously there were two arguments: transformTo(RelNode rel, Map<RelNode, RelNode> equiv), and both arguments (RelNode and Map) were consistent. RelNode argument was just like a shortcut for the case when only a single equivalence needs to be registered.
Now you add {{BiFunction<RelNode, RelNode, RelNode> handler}} function that applies to one of the arguments only, and it completely ignores {{Map<RelNode, RelNode>}}
That does not sound right.
Re BiFunction. Have you considered to create a named interface to express the meaning of the parameter?
Frankly speaking, {{BiFunction<RelNode, RelNode, RelNode> handler}} is really confusing (both interface naming and parameter naming).
> Implement SQL and planner hints
> -------------------------------
>
> Key: CALCITE-482
> URL: https://issues.apache.org/jira/browse/CALCITE-482
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Affects Versions: 1.21.0
> Reporter: Vladimir Sitnikov
> Assignee: Danny Chen
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.22.0
>
> Time Spent: 8h 10m
> Remaining Estimate: 0h
>
> Query optimizer can never be perfect, so it makes sense to implement hints to allow user better control the execution.
> For instance: "never merge this subquery with others" (`/+ no_merge/`), "treat those tables as leading ones" (`/*+ leading */`), etc.
> Hints would enable predictable performance and the planning time would be improved as well.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)