-
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
executor: specially handle empty input for apply's outer child aggregate (#20544) #21137
executor: specially handle empty input for apply's outer child aggregate (#20544) #21137
Conversation
/run-all-tests |
@eurekaka you're already a collaborator in bot's repo. |
/run-all-tests |
@eurekaka Please fix the test. |
0b3ec33
to
3674bf1
Compare
/run-check_dev |
3674bf1
to
b2cb566
Compare
/run-all-tests tidb-test=pr/ 1138 |
1 similar comment
/run-all-tests tidb-test=pr/ 1138 |
/run-all-tests tidb-test=pr/1138 |
/run-integration-compatibility-test tidb-test=pr/1138 |
/run-integration-compatibility-test tidb-test=pr/1138 |
/run-all-tests tidb-test=pr/1138 |
/run-all-tests tidb-test=pr/1138 |
/merge |
@zz-jason Oops! This PR requires at least 2 LGTMs to merge. The current number of |
PTAL @eurekaka Please resolve conflicts. |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
2e52b8a
to
72c17f1
Compare
should be merged with https://github.com/pingcap/tidb-test/pull/1138 |
/run-all-tests tidb-test=pr/1138 |
/run-all-tests tidb-test=pr/1138 |
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.
lgtm
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.
LGTM
/run-all-tests |
cherry-pick #20544 and #21902 to release-4.0
What problem does this PR solve?
Issue Number: close #13749
Problem Summary:
Wrong query result for Apply operator when its outer child is an aggregate, and the input for the aggregate is empty.
What is changed and how it works?
What's Changed:
If the input for any aggregate in the outer executor tree is empty, we believe this outer row has no match in the apply, since inner child of apply can only reference columns from base outer tables(i.e, aggregate result cannot be referenced in the subquery). Exceptions are cases where outer child contains Join / Union executors, we specially handle them.
Related changes
Check List
Tests
Side effects
N/A
Release note