-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
planner: fix incorrect maintenance of handleColHelper
for recursive CTE (#55732)
#55899
planner: fix incorrect maintenance of handleColHelper
for recursive CTE (#55732)
#55899
Conversation
Signed-off-by: ti-chi-bot <[email protected]>
/retest |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## release-8.1 #55899 +/- ##
================================================
Coverage ? 71.1856%
================================================
Files ? 1466
Lines ? 423063
Branches ? 0
================================================
Hits ? 301160
Misses ? 101382
Partials ? 20521
Flags with carried forward coverage won't be shown. Click here to find out more.
|
/retest |
@Rustin170506: adding LGTM is restricted to approvers and reviewers in OWNERS files. In response to this: Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Rustin170506, time-and-fate, winoros The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
This is an automated cherry-pick of #55732
What problem does this PR solve?
Issue Number: close #55666
Problem Summary:
If the recursive part of a CTE references tables other than the CTE itself, the
b.handleHelper
won't be correctly cleared duringbuildRecursiveCTE()
.It's because this function relies on an error from
buildSelect()
orbuildSetOpr()
to recognize the boundary between the seed part and the recursive part. Butb.handleHelper
won't be cleared when an error happens.When this happens, there will be some wrong and redundant entries in
b.handleHelper
, which makes users of this field likebuildDelete()
get the wrong result or panic.What changed and how does it work?
Since this PR needs to be cherry-picked, I can't change too many.
buildRecursiveCTE()
, clear theb.handleHelper
if an error is returned frombuildSelect()
orbuildSetOpr()
.b.handleHelper
more clear for recursive CTE:tryBuildCTE()
will always push an entry into handleHelper when successful.buildRecursiveCTE()
will always push an entry into handleHelper when successful.Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.