You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2016/01/06 00:15:39 UTC

[jira] [Commented] (ASTERIXDB-1229) RemoveRedundantListifyRule does not consider expressions other then variableReferences

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

ASF subversion and git services commented on ASTERIXDB-1229:
------------------------------------------------------------

Commit 09b2ad73dd14e80ceb1f3253c97a9c5eca717d22 in incubator-asterixdb's branch refs/heads/master from [~iabsalyamov]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-asterixdb.git;h=09b2ad7 ]

ASTERIXDB-1229:
- Fixed RemoveRedundantListifyRule to consider general expressions

Change-Id: I5e7b6f5ca4ed51e91de371b9d0b4e4dabdd2f2df
Reviewed-on: https://asterix-gerrit.ics.uci.edu/555
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Preston Carman <pr...@apache.org>


> RemoveRedundantListifyRule does not consider expressions other then variableReferences
> --------------------------------------------------------------------------------------
>
>                 Key: ASTERIXDB-1229
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-1229
>             Project: Apache AsterixDB
>          Issue Type: Bug
>          Components: Optimizer
>            Reporter: Ildar Absalyamov
>            Assignee: Ildar Absalyamov
>
> Consider the ddl:
> {noformat}
> drop dataverse test if exists;
> create dataverse test
> use dataverse test
> create type listType as {
>   "id": int64,
>   "list": [int64]
> }
> create dataset listDS(listType) primary key id
> insert into dataset listDS({"id":1, "list":[1,2,3]})
> {noformat}
> The following two queries, being semantically the same produce different plans:
> {noformat}
> for $x in dataset listDS
> return  avg(for $y in $x.list
>  return $y)
> {noformat}
> {noformat}
> for $x in dataset listDS
> return  avg($x.list)
> {noformat}
> The former query produces a subplan, but if get incorrectly optimized by RemoveRedundantListifyRule since the argument of scan-collection is an expression, rather then a variable:
> {noformat}
> distribute result [%0->$$3] -- |UNPARTITIONED|
>   project ([$$3]) -- |UNPARTITIONED|
>     assign [$$3] <- [function-call: asterix:avg, Args:[%0->$$5]] -- |UNPARTITIONED|
>       subplan {
>                 aggregate [$$5] <- [function-call: asterix:listify, Args:[%0->$$1]] -- |UNPARTITIONED|
>                   unnest $$1 <- function-call: asterix:scan-collection, Args:[function-call: asterix:field-access-by-name, Args:[%0->$$0, AString: {list}]] -- |UNPARTITIONED|
>                     nested tuple source -- |UNPARTITIONED|
>              } -- |UNPARTITIONED|
>         data-scan []<-[$$6, $$0] <- test:listDS -- |UNPARTITIONED|
>           empty-tuple-source -- |UNPARTITIONED|
> {noformat}



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