You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hawq.apache.org by huor <gi...@git.apache.org> on 2016/06/20 03:11:40 UTC

[GitHub] incubator-hawq pull request #731: HAWQ-830. Fix wrong result in CTE query du...

GitHub user huor opened a pull request:

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

    HAWQ-830. Fix wrong result in CTE query due to CTE is treated as init plan by planner and evaluated multiple times

    

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

    $ git pull https://github.com/huor/incubator-hawq huor_cte

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

    https://github.com/apache/incubator-hawq/pull/731.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 #731
    
----
commit 93c9f3b1d2d52f19086da006f5e02813527cfb5c
Author: Ruilong Huo <rh...@pivotal.io>
Date:   2016-06-20T03:12:32Z

    HAWQ-830. Fix wrong result in CTE query due to CTE is treated as init plan by planner and evaluated multiple times

----


---
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 issue #731: HAWQ-830. Fix wrong result in CTE query due to CT...

Posted by huor <gi...@git.apache.org>.
Github user huor commented on the issue:

    https://github.com/apache/incubator-hawq/pull/731
  
    @vraghavan78, yes, you are correct.
    
    gp_cte_sharing was introduced to workaround deadlock in shared scan in some CTE queries. For example, https://issues.apache.org/jira/browse/HAWQ-852 is a hang issue when gp_cte_sharing is on.
    
    However, if we disable gp_cte_sharing (especially by default), we get wrong result when running some other CTE queries. One of the common root cause is that: with gp_cte_sharing off, some of the CTE expressions are evaluated multiple times in one single query; if the CTE expression itself is somehow "volatile", it is obviously that wrong result (at least inconsistent result) will be generated.
    For example, https://issues.apache.org/jira/browse/HAWQ-830, https://issues.apache.org/jira/browse/HAWQ-852 are two issues that generate wrong results with CTE query.
    
    My recommendation is: we need to enable gp_cte_sharing by default (actually this GUC should be removed ideally), and then fix the hang issue in shared scan. Your thoughts?


---
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 issue #731: HAWQ-830. Fix wrong result in CTE query due to CT...

Posted by edespino <gi...@git.apache.org>.
Github user edespino commented on the issue:

    https://github.com/apache/incubator-hawq/pull/731
  
    @huor - Any update on this PR?  There hasn't been any progress on it in months. This is the same for the corresponding Jira HAWQ-830


---
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 issue #731: HAWQ-830. Fix wrong result in CTE query due to CT...

Posted by huor <gi...@git.apache.org>.
Github user huor commented on the issue:

    https://github.com/apache/incubator-hawq/pull/731
  
    @edespino, it is better to merge this fix along with extra fix for wrong result and hang in CTE query. Given there is a lot of effort to fix the wrong result and hang in CTE, I think we can close this pr without merge it for now. We can do that when they are fixed.


---
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 issue #731: HAWQ-830. Fix wrong result in CTE query due to CT...

Posted by zhangh43 <gi...@git.apache.org>.
Github user zhangh43 commented on the issue:

    https://github.com/apache/incubator-hawq/pull/731
  
    GUC gp_cte_sharing cannot be false, and should be removed.
    Because it's not consistent with CTE semantic(CTE should not be init plan more than once).


---
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 issue #731: HAWQ-830. Fix wrong result in CTE query due to CT...

Posted by zhangh43 <gi...@git.apache.org>.
Github user zhangh43 commented on the issue:

    https://github.com/apache/incubator-hawq/pull/731
  
    We can keep this GUC gp_cte_sharing temporarily
    +1


---
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 issue #731: HAWQ-830. Fix wrong result in CTE query due to CT...

Posted by vraghavan78 <gi...@git.apache.org>.
Github user vraghavan78 commented on the issue:

    https://github.com/apache/incubator-hawq/pull/731
  
    gp_cte_sharing when set to true, the planner sometimes gets into a deadlock.


---
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 issue #731: HAWQ-830. Fix wrong result in CTE query due to CT...

Posted by xunzhang <gi...@git.apache.org>.
Github user xunzhang commented on the issue:

    https://github.com/apache/incubator-hawq/pull/731
  
    +1


---
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 issue #731: HAWQ-830. Fix wrong result in CTE query due to CT...

Posted by edespino <gi...@git.apache.org>.
Github user edespino commented on the issue:

    https://github.com/apache/incubator-hawq/pull/731
  
    @huor - Yes let's close this PR for now.  Thanks, -=e


---
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 #731: HAWQ-830. Fix wrong result in CTE query du...

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

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


---
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 issue #731: HAWQ-830. Fix wrong result in CTE query due to CT...

Posted by huor <gi...@git.apache.org>.
Github user huor commented on the issue:

    https://github.com/apache/incubator-hawq/pull/731
  
    Close the pr for now. Need to merge the fix after wrong result and hang in CTE query is fixed. 


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