hawq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ztao1987 <...@git.apache.org>
Subject [GitHub] incubator-hawq pull request: HAWQ-442. Fix the wrong resname of Ta...
Date Tue, 23 Feb 2016 09:51:35 GMT
GitHub user ztao1987 opened a pull request:


    HAWQ-442. Fix the wrong resname of TargetEntry for group by clause.

    Reproduce steps:
    create table sale
        cn int not null,
        vn int not null,
        pn int not null,
        dt date not null,
        qty int not null,
        prc float not null
    ) WITH (appendonly=true, orientation = parquet) distributed by (cn,vn,pn);
    insert into sale values
    ( 2, 40, 100, '1401-1-1', 1100, 2400);
    taoz=# explain SELECT sale.qty as newalias1,sale.qty as newalias2 FROM sale GROUP BY ROLLUP(newalias2,newalias1);
                                                                       QUERY PLAN
     Gather Motion 8:1  (slice2; segments: 8)  (cost=1.06..1.09 rows=3 width=8)
       ->  HashAggregate  (cost=1.06..1.09 rows=1 width=8)
             Group By: partial_aggregation.newalias1, partial_aggregation.newalias1, partial_aggregation."grouping",
             ->  Subquery Scan partial_aggregation  (cost=1.02..1.06 rows=0 width=20)
                   ->  Redistribute Motion 8:8  (slice1; segments: 8)  (cost=1.02..1.06
rows=0 width=20)
                         Hash Key: "rollup".newalias1, "rollup".newalias1
                         ->  GroupAggregate  (cost=1.02..1.06 rows=0 width=20)
                               Group By: "rollup"."grouping", "rollup"."group_id"
                               ->  Subquery Scan "rollup"  (cost=1.02..1.06 rows=0 width=20)
                                     ->  GroupAggregate  (cost=1.02..1.06 rows=0 width=20)
                                           Group By: "rollup".newalias1, "rollup"."grouping",
                                           ->  Subquery Scan "rollup"  (cost=1.02..1.05
rows=1 width=20)
                                                 ->  GroupAggregate  (cost=1.02..1.04 rows=1
                                                       Group By: sale.qty, sale.qty
                                                       ->  Sort  (cost=1.02..1.02 rows=1
                                                             Sort Key: sale.qty, sale.qty
                                                             ->  Parquet table Scan on
sale  (cost=0.00..1.01 rows=1 width=4)
     Settings:  optimizer=off
     Optimizer status: legacy query optimizer
    (19 rows)
    Wrongly used the name newalias1 and newalias2

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ztao1987/incubator-hawq HAWQ-442

Alternatively you can review and apply these changes as the patch at:


To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #374
commit dbec949620be482c1dd0b5d2cb377e5cb8bd1a04
Author: hubertzhang <hzhang@pivotal.io>
Date:   2016-02-23T09:35:24Z

    HAWQ-440. Fix bug in pg_regress of commit HAWQ-432.

commit 5b04711a9fb87c132124457d99bfc8bb81a9a35a
Author: zhenglin tao <zhenglin.taozl@gmail.com>
Date:   2016-02-23T09:50:02Z

    HAWQ-442. Fix the wrong resname of TargetEntry for group by clause.


If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.

View raw message