You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Dmitry Lychagin (JIRA)" <ji...@apache.org> on 2017/08/23 00:10:00 UTC

[jira] [Assigned] (ASTERIXDB-1839) Subquery de-correlation problem.

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

Dmitry Lychagin reassigned ASTERIXDB-1839:
------------------------------------------

    Assignee: Dmitry Lychagin  (was: Yingyi Bu)

> Subquery de-correlation problem.
> --------------------------------
>
>                 Key: ASTERIXDB-1839
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-1839
>             Project: Apache AsterixDB
>          Issue Type: Bug
>          Components: *DB - AsterixDB
>         Environment: MAC linux
>            Reporter: Wenhai
>            Assignee: Dmitry Lychagin
>            Priority: Critical
>
> When setup a subquery before an effective query and return a simple list, we get a problem regarding the subquery decorrelation.
> Query on tpch LineItem:
> {noformat}
> use dataverse tpch;
> let $c := count(
> for $d in dataset LineItem
> return $d
> )
> for $g in [1,2,3,4,5]
> return $g
> {noformat}
> Plan
> {noformat}
> distribute result [%0->$$2]
> -- DISTRIBUTE_RESULT  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
>     join (TRUE)
>     -- NESTED_LOOP  |PARTITIONED|
>       exchange
>       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
>         project ([])
>         -- STREAM_PROJECT  |PARTITIONED|
>           exchange
>           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
>             data-scan []<-[$$8, $$9, $$0] <- tpch:LineItem
>             -- DATASOURCE_SCAN  |PARTITIONED|
>               exchange
>               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
>                 empty-tuple-source
>                 -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
>       exchange
>       -- BROADCAST_EXCHANGE  |PARTITIONED|
>         unnest $$2 <- function-call: asterix:scan-collection, Args:[AOrderedList: [ AInt64: {1}, AInt64: {2}, AInt64: {3}, AInt64: {4}, AInt64: {5} ]]
>         -- UNNEST  |UNPARTITIONED|
>           aggregate [] <- []
>           -- AGGREGATE  |UNPARTITIONED|
>             empty-tuple-source
>             -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
> {noformat}
> Is this plan correct?



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)