[
https://issues.apache.org/jira/browse/ASTERIXDB-1839?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Yingyi Bu reassigned ASTERIXDB-1839:
------------------------------------
Assignee: 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: AsterixDB
> Environment: MAC linux
> Reporter: Wenhai
> Assignee: Yingyi Bu
> 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.3.15#6346)