You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "Fabian Hueske (JIRA)" <ji...@apache.org> on 2016/01/12 18:20:39 UTC

[jira] [Created] (FLINK-3223) Translate Table API query into logical relational plans for Apache Calcite

Fabian Hueske created FLINK-3223:
------------------------------------

             Summary: Translate Table API query into logical relational plans for Apache Calcite
                 Key: FLINK-3223
                 URL: https://issues.apache.org/jira/browse/FLINK-3223
             Project: Flink
          Issue Type: Sub-task
          Components: Table API
            Reporter: Fabian Hueske


This task is about translating Table API queries into logical relational plans for Apache Calcite.

With the Table API, logical queries are constructed by successive Table API calls such as filter(), select(), and join(). Right now, the Table API checks for semantic validity of the embedded expressions. These check can be removed and delegated to Calcite. The table query construction is roughly equivalent to the parsing step of a SQL query.

When a Table API query is completely constructed, it is translated into a Calcite RelNode tree, which corresponds to a logical query plan. During this step, the query needs to be semantically checked. Apache Calcite includes a so-called RelBuilder that provides utility methods to construct a tree of RelNodes. It also performs semantic checks while building the tree.

The result of the translation is a logical relational plan, which is will be optimized and translated by Calcite in the next step.

For this task we need to:
- Initialize a Calcite catalog / schema provider with schema information from the TableEnvironment.
- Simplify the Table API query construction and remove semantic checks and expression rewriting. It should be possible to reuse the current PlanNode representation of the Table API to represent Table API queries.
- Translate a Table API query into Calcite RelNodes. This means translating a tree of PlanNodes into a RelNode tree using Calciteā€™s RelBuilder.



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