You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@quickstep.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2018/04/21 22:16:00 UTC

[jira] [Commented] (QUICKSTEP-118) Optimization Rule For Union of same subqueries

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

Julian Hyde commented on QUICKSTEP-118:
---------------------------------------

Only valid if int_col is unique.

> Optimization Rule For Union of same subqueries
> ----------------------------------------------
>
>                 Key: QUICKSTEP-118
>                 URL: https://issues.apache.org/jira/browse/QUICKSTEP-118
>             Project: Apache Quickstep
>          Issue Type: Improvement
>          Components: Query Optimizer
>            Reporter: Zuyu Zhang
>            Priority: Minor
>
> Currently, [the following query|https://github.com/apache/incubator-quickstep/blob/master/query_optimizer/tests/physical_generator/Select.test#L3156] is convert into a `UnionAll` followed by `Aggregate` for de-duplication.
> {code:java}
> SELECT int_col FROM test
> UNION
> SELECT int_col FROM test;
> {code}
>  
> The optimizer should, however, transform such query into a simple select query:
> {code:java}
> SELECT int_col FROM test;
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)