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 2017/01/04 00:03:58 UTC

[jira] [Resolved] (TRAFODION-2320) Make subquery unnesting work with common subexpressions

     [ https://issues.apache.org/jira/browse/TRAFODION-2320?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hans Zeller resolved TRAFODION-2320.
------------------------------------
    Resolution: Not A Problem

The subquery unnesting transformations happen in Join::semanticQueryOptimizeNode(). This method first calls semanticQueryOptimizeNode() on the children before attempting any unnesting transformations. Therefore the CommonSubExprRef nodes will be eliminated by the time we reach it, and therefore those nodes don't cause a problem. Testing TPC-DS queries with CSEs enabled and also warnings for missing unnesting operations enabled confirmed that this is not an issue.

> Make subquery unnesting work with common subexpressions
> -------------------------------------------------------
>
>                 Key: TRAFODION-2320
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-2320
>             Project: Apache Trafodion
>          Issue Type: Sub-task
>          Components: sql-cmp
>    Affects Versions: 2.1-incubating
>            Reporter: Hans Zeller
>            Assignee: Hans Zeller
>
> The subquery unnesting code relies on a certain structure of the query tree, with join and groupby nodes arranged in a certain way. If we have CommonSubExprRef nodes present in the tree, the unnesting logic doesn't recognize some of the patterns and subquery unnesting doesn't take place.
> Hopefully we can somehow ignore these extra nodes in subquery unnesting.



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