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-427. Fix bug of wrong results in...
Date Sun, 21 Feb 2016 12:50:09 GMT
GitHub user ztao1987 opened a pull request:

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

    HAWQ-427. Fix bug of wrong results in mdqa+rollup.

    In mdqa join motion, dqa agg TargetEntry appears as the Hash Key of Redistribute Motion
for HashJoin, which is wrong. The wrong plan is simplified as below:
    ```
    ->  Hash Join 
        Hash Cond: NOT dqa_coplan_1.vn IS DISTINCT FROM dqa_coplan_2.vn
        ->  Redistribute Motion 2:2
           Hash Key: dqa_coplan_1.vn,  dqa_coplan_1.max
        ->  Hash  
           ->  Redistribute Motion 2:2
                Hash Key: dqa_coplan_2.vn, dqa_coplan_2.max
    ```
    Here dqa_coplan_1.max and dqa_coplan_2.max should not be the key.
    
    Root cause is that tleSortGroupRef in SortClause for Rollup is zero, while ressortgroupref
in TargetEntry for dqa agg is also zero. In get_sortgrouplist_exprs, we tried to build the
referenced targetlist for SortGroupClause. However we don't consider they are both zero when
checking if tleSortGroupRef equals to ressortgroupref. 

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

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

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

    https://github.com/apache/incubator-hawq/pull/362.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 #362
    
----
commit bef4e868107216a97cd60f98d0ed57ffdf196a19
Author: zhenglin tao <zhenglin.taozl@gmail.com>
Date:   2016-02-21T12:15:59Z

    HAWQ-427. Fix bug of wrong results in mdqa+rollup.

----


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

Mime
View raw message