-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ADBDEV-3539: Pass required distribution through trivial filter #514
Conversation
I'll update the commit description if that description is clear. |
After merging a branch, this branch will need to be rebased to the dev branch. |
…ution for Sequence children The condition for checking the requested distribution does not work in case of inlining the outer CTE by a filter, because the filter replaces the requested distribution. Therefore, for cases of CTE inlining by a filter, I added a flag that remembers this, and then if this flag is set, then the filter passes the requested distribution, and does not replace it.
src/backend/gporca/libgpopt/src/xforms/CXformCTEAnchor2TrivialSelect.cpp
Outdated
Show resolved
Hide resolved
There is a simplified version of the patch. It leads to the same results. But it requires the removal of two asserts. |
Should this patch fix the porblem with fallback to postgres optimizer of query, which you found at the review of ASBDEV-3888? |
No, none of the CTEs are inlined by the filter in that query. |
src/backend/gporca/libgpopt/src/xforms/CXformCTEAnchor2TrivialSelect.cpp
Outdated
Show resolved
Hide resolved
if (CDistributionSpec::EdtNonSingleton == pdsRequired->Edt() && | ||
!CDistributionSpecNonSingleton::PdsConvert(pdsRequired) | ||
->FAllowReplicated()) | ||
if (FTrivial()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this condition is enough to make a decision that we should return the required distribution?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this condition is enough to make a decision that we should return the required distribution?
This condition is sufficient to make a decision to pass the requested distribution through the filter.
LGTM, but seems some words about |
Allure report |
Allure report https://allure-ee.adsw.io/launch/55880 |
Failed job Behave tests on x86_64: https://gitlab.adsw.io/arenadata/github_mirroring/gpdb/-/jobs/677351 |
Allure report https://allure-ee.adsw.io/launch/57890 |
Failed job Resource group isolation tests on x86_64: https://gitlab.adsw.io/arenadata/github_mirroring/gpdb/-/jobs/760167 |
Failed job Resource group isolation tests on ppc64le: https://gitlab.adsw.io/arenadata/github_mirroring/gpdb/-/jobs/760168 |
Allure report https://allure-ee.adsw.io/launch/61010 |
Failed job Resource group isolation tests on x86_64: https://gitlab.adsw.io/arenadata/github_mirroring/gpdb/-/jobs/924552 |
Failed job Resource group isolation tests on ppc64le: https://gitlab.adsw.io/arenadata/github_mirroring/gpdb/-/jobs/924553 |
Allure report https://allure-ee.adsw.io/launch/62823 |
Failed job Resource group isolation tests on x86_64: https://gitlab.adsw.io/arenadata/github_mirroring/gpdb/-/jobs/1011553 |
Failed job Resource group isolation tests on ppc64le: https://gitlab.adsw.io/arenadata/github_mirroring/gpdb/-/jobs/1011554 |
Allure report https://allure.adsw.io/launch/69736 |
The condition for checking the requested distribution does not work in case of inlining the outer CTE by a filter, because the filter replaces the requested distribution.
Therefore, for cases of CTE inlining by a filter, I added a flag that remembers this, and then if this flag is set, then the filter passes the requested distribution, and does not replace it.
All of this gives right plan