-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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: speed up PhysicalTopN#containVirtualColumn #46812
Conversation
Hi @tedyu. Thanks for your PR. I'm waiting for a pingcap member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
Hi @tedyu. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. 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. |
cc @hawkingrei |
/ok-to-test |
It seems the above error was not related to my PR. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #46812 +/- ##
================================================
- Coverage 73.3326% 72.7066% -0.6261%
================================================
Files 1322 1343 +21
Lines 396474 402761 +6287
================================================
+ Hits 290745 292834 +2089
- Misses 87208 91363 +4155
- Partials 18521 18564 +43
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Yes, I think it is about our CI. |
The above error doesn't seem to be related to my PR. I wonder if this may happen before all the upgrade scripts in |
/test all |
1 similar comment
/test all |
I found it. it is not your problem. |
/test all |
/test unit-test |
@hawkingrei: The specified target(s) for
Use 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. |
/test check-dev |
@hawkingrei: The specified target(s) for
Use 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: hawkingrei, qw4990 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:
|
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.
👍🏿
If we can add a golang benchmark to it, that would be nice.
for _, by := range p.ByItems { | ||
cols := expression.ExtractColumns(by.Expr) | ||
for _, col := range cols { | ||
for _, tCol := range tCols { | ||
if _, ok := tColSet[col.ID]; ok { | ||
// A column with ID > 0 indicates that the column can be resolved by data source. |
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.
Could you please move this comment to the right place? Thanks!
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.
the PR has been merged.
If I happen to modify this class again, I can move it.
I think it is fine to leave the comment here as well.
What problem does this PR solve?
Issue Number: close #46809
Problem Summary:
Using nested loop is inefficient when column count is high.
What is changed and how it works?
This is a refactoring of
PhysicalTopN#containVirtualColumn
.At the beginning, we establish a
map
from column Id to*expression.Column
.In the main loop, we just check whether the underlying column Id is in the map.
Check List
Tests
Side effects
Documentation
Release note