You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2016/11/22 00:06:58 UTC

[jira] [Commented] (CALCITE-1499) Add an option to exclude VolcanoPlanner's "originalRoot" from planning process

    [ https://issues.apache.org/jira/browse/CALCITE-1499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15685176#comment-15685176 ] 

Julian Hyde commented on CALCITE-1499:
--------------------------------------

Makes sense. I haven't checked the code, but is it possible to do this by adding an extra step to a {{Program}}? Or perhaps extending the Program API a little. I would love to be able to accomplish these kind of things without changing the planner engine.

> Add an option to exclude VolcanoPlanner's "originalRoot" from planning process
> ------------------------------------------------------------------------------
>
>                 Key: CALCITE-1499
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1499
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 1.10.0
>            Reporter: Maryann Xue
>            Assignee: Maryann Xue
>
> The Calcite compilation framework runs a series of Programs for query planning. The default programs consist of some pre-processing HepPrograms, e.g., de-correlation, field-trimming, etc.,  the volcano planning program, and some post-processing HepPrograms. In {{Prepare.optimize()}}, {{planner.setRoot()}} is called before running the programs. As a result, the original rel from sql-to-rel conversion becomes the "originalRoot" in the VolcanoPlanner, and the new rel from the pre-processing programs becomes the new "root". In some cases, we would only want to run volcano planning on the new root based on the assumption that the new root is the desired form after pre-processing. And if we have an option to turn off the planning of the original root, the planning space can be significantly reduced.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)