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

Fabian Hueske commented on FLINK-3223:
--------------------------------------

[~twalthr] and [~chengxiang li], I just pushed a commit for this issue to the 
{{tableOnCalcite}} branch. 
Table API queries are directly translated to Calcite RelNodes.

I will continue with FLINK-3225.

> 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
>            Assignee: 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)

Reply via email to