You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "Hans Zeller (JIRA)" <ji...@apache.org> on 2016/09/23 01:41:20 UTC

[jira] [Commented] (TRAFODION-2127) enhance Trafodion implementation of WITH clause

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

Hans Zeller commented on TRAFODION-2127:
----------------------------------------

What I would like to add is a CommonSubExpr relational operator, derived from RelExpr. The WITH clause syntax will generate this new operator in the binder, as we expand the references to CTEs. The operator contains the following information:

* The name of the CTE (name given in WITH clause)
* An index of which reference of the CTE it is (first reference is 0, second is 1, etc)
* The list of columns produced by this expression
* The set of predicates that has been pushed down through this operator

The operator has a single child (unary operator), which is the cloned tree generated in the binder for the CTE. In a first phase I would like to get this operator to work and not to interfere with the optimization. Then, in a second phase, I would like to add a heuristic (for now) transformation to populate a temp table and replace the CommonSubExpr nodes with a scan of the temp table.

> enhance Trafodion implementation of WITH clause
> -----------------------------------------------
>
>                 Key: TRAFODION-2127
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-2127
>             Project: Apache Trafodion
>          Issue Type: Improvement
>            Reporter: liu ming
>            Assignee: Hans Zeller
>
> TRAFODION-1673 described some details about how to support WITH clause in Trafodion.
> As initial implementation, we use a simple pure-parser method.
> That way, Trafodion can support WITH clause functionally, but not good from performance point of view,
> also need to enhance the parser to be more strict in syntax.
> This JIRA is a follow up JIRA, to track following effort to support Trafodion WITH clause.



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