You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2016/12/02 20:16:58 UTC
[jira] [Created] (CALCITE-1525) Use "Planner" to handle query
preparation process in CalcitePrepareImpl
Julian Hyde created CALCITE-1525:
------------------------------------
Summary: Use "Planner" to handle query preparation process in CalcitePrepareImpl
Key: CALCITE-1525
URL: https://issues.apache.org/jira/browse/CALCITE-1525
Project: Calcite
Issue Type: Bug
Reporter: Julian Hyde
Assignee: Julian Hyde
The query preparation process (parse, validate, convert SqlNode to RelNode, plan) is complicated, and each step depends on state on the previous one. We have two ways of managing that preparation process: [CalcitePrepareImpl|https://calcite.apache.org/apidocs/org/apache/calcite/prepare/CalcitePrepareImpl.html] (used by the JDBC driver) and [org.apache.calcite.tools.Planner|https://calcite.apache.org/apidocs/org/apache/calcite/tools/Planner.html] (your only practical option if your code doesn't live inside JDBC).
We should make {{CalcitePrepareImpl}} use a {{Planner}} internally, get rid of shared logic, and make them behave consistently.
From [email thread|https://mail-archives.apache.org/mod_mbox/calcite-dev/201611.mbox/%3C9499388B-64A4-4BB0-9957-7FABC913AA48%40apache.org%3E] with [~gian]:
{quote}
Compare and contrast:
* [CalcitePrepareImpl.getSqlToRelConverter|https://github.com/apache/calcite/blob/3f92157d5742dd10f3b828d22d7a753e0a2899cc/core/src/main/java/org/apache/calcite/prepare/CalcitePrepareImpl.java#L1114]
* [PlannerImpl.rel|https://github.com/apache/calcite/blob/105bba1f83cd9631e8e1211d262e4886a4a863b7/core/src/main/java/org/apache/calcite/prepare/PlannerImpl.java#L225]
{quote}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)