You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hawq.apache.org by ztao1987 <gi...@git.apache.org> on 2016/02/23 10:51:35 UTC

[GitHub] incubator-hawq pull request: HAWQ-442. Fix the wrong resname of Ta...

GitHub user ztao1987 opened a pull request:

    https://github.com/apache/incubator-hawq/pull/374

    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", partial_aggregation."group_id"
             ->  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", "rollup"."group_id"
                                           ->  Subquery Scan "rollup"  (cost=1.02..1.05 rows=1 width=20)
                                                 ->  GroupAggregate  (cost=1.02..1.04 rows=1 width=20)
                                                       Group By: sale.qty, sale.qty
                                                       ->  Sort  (cost=1.02..1.02 rows=1 width=4)
                                                             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:

    https://github.com/apache/incubator-hawq/pull/374.patch

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 <hz...@pivotal.io>
Date:   2016-02-23T09:35:24Z

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

commit 5b04711a9fb87c132124457d99bfc8bb81a9a35a
Author: zhenglin tao <zh...@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.
---

[GitHub] incubator-hawq pull request: HAWQ-442. Fix bug that wrong results ...

Posted by wengyanqing <gi...@git.apache.org>.
Github user wengyanqing commented on the pull request:

    https://github.com/apache/incubator-hawq/pull/374#issuecomment-189130962
  
    LGTM


---
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.
---

[GitHub] incubator-hawq pull request: HAWQ-442. Fix bug that wrong results ...

Posted by ztao1987 <gi...@git.apache.org>.
Github user ztao1987 closed the pull request at:

    https://github.com/apache/incubator-hawq/pull/374


---
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.
---