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 2017/09/08 21:57:00 UTC

[jira] [Commented] (ASTERIXDB-2051) Variable not found in a complex group-by query

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

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

Commit 342bd342eb08099ae0fb76df56697924fba8fffd in asterixdb's branch refs/heads/master from [~buyingyi]
[ https://git-wip-us.apache.org/repos/asf?p=asterixdb.git;h=342bd34 ]

[ASTERIXDB-2051][COMP] Fix PushSubplanIntoGroupByRule for complex cases.

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- re-implement PushSubplanIntoGroupByRule and let it handle general cases;
- add an option to LogicalOperatorDeepCopyWithNewVariablesVisitor for
  not re-mapping free variables in the given plan subtree.

Change-Id: I969c40112be0506981357a9c41bf9675ae12ffb9
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1992
Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Contrib: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Dmitry Lychagin <dm...@couchbase.com>


> Variable not found in a complex group-by query
> ----------------------------------------------
>
>                 Key: ASTERIXDB-2051
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-2051
>             Project: Apache AsterixDB
>          Issue Type: Bug
>          Components: COMP - Compiler
>            Reporter: Yingyi Bu
>            Assignee: Yingyi Bu
>
> {noformat}
> DROP  DATAVERSE tpch IF EXISTS;
> CREATE  dataverse tpch;
> USE tpch;
> CREATE TYPE LineItemType AS CLOSED {
>   l_orderkey : integer,
>   l_partkey : integer,
>   l_suppkey : integer,
>   l_linenumber : integer,
>   l_quantity : double,
>   l_extendedprice : double,
>   l_discount : double,
>   l_tax : double,
>   l_returnflag : string,
>   l_linestatus : string,
>   l_shipdate : string,
>   l_commitdate : string,
>   l_receiptdate : string,
>   l_shipinstruct : string,
>   l_shipmode : string,
>   l_comment : string
> }
> CREATE DATASET LineItem(LineItemType) PRIMARY KEY l_orderkey,l_linenumber;
> SELECT l_returnflag AS l_returnflag,
>        l_linestatus AS l_linestatus,
>        coll_count(cheap) AS count_cheaps,
>        coll_count(expensive) AS count_expensives
> FROM LineItem AS l
> /* +hash */
> GROUP BY l.l_returnflag AS l_returnflag,l.l_linestatus AS l_linestatus
> GROUP AS g
> LET cheap = (
>       SELECT ELEMENT g.l
>       FROM g
>       WHERE g.l.l_discount > 0.05
> ),
> expensive = (
>       SELECT ELEMENT m
>       FROM (FROM g SELECT VALUE l) AS m
>       WHERE m.l_discount <= 0.05
> )
> ORDER BY l_returnflag,l_linestatus
> ;
> {noformat}



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