-
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: fix the issue where TiDB generates multiple plandigests for 'IN (...)'. #47216
Conversation
Welcome @King-Dylan! |
Hi @King-Dylan. 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 @King-Dylan. 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. |
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.
This patch only works for IN list where it is in predicate, but will it work for IN list in Projection? e.g.
select a in (1, 2, 3) from t;
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.
Can we also add test case for projection?
Please sign it @King-Dylan |
expression/explain.go
Outdated
} | ||
default: | ||
if expr.FuncName.L == ast.In { | ||
buffer.WriteString("...") |
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.
What if there is only one constant or if there are columns in the arguments? What's the expected behavior?
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.
I think if the plan hasn't changed, we don't need to worry about how many arguments are used. What do you think about? I can add more logical if you think it's necessary.
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.
I think we can say this is proper and expected behavior. And I'm also OK with this idea.
What I'm concerned about is that it's not fully consistent with the behavior of SQL digest. Essentially there isn't an overall design for their behaviors.
expression/explain.go
Outdated
} | ||
default: | ||
if expr.FuncName.L == ast.In { | ||
buffer.WriteString("...") |
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.
I think we can say this is proper and expected behavior. And I'm also OK with this idea.
What I'm concerned about is that it's not fully consistent with the behavior of SQL digest. Essentially there isn't an overall design for their behaviors.
[LGTM Timeline notifier]Timeline:
|
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #47216 +/- ##
================================================
+ Coverage 71.5920% 72.9398% +1.3477%
================================================
Files 1400 1423 +23
Lines 405894 413929 +8035
================================================
+ Hits 290588 301919 +11331
+ Misses 95488 93118 -2370
+ Partials 19818 18892 -926
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@King-Dylan: Cannot trigger testing until a trusted user reviews the PR and leaves an 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. |
1 similar comment
@King-Dylan: Cannot trigger testing until a trusted user reviews the PR and leaves an 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. |
/ok-to-test |
/test tiprow_fast_test |
@King-Dylan: The specified target(s) for
The following commands are available to trigger optional jobs:
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. |
@King-Dylan: 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. |
/retest |
/retest |
1 similar comment
/retest |
/approve A reasonable optimization for tidb_ignore_inlist_plan_digest is to exclude inlists from plan digests in most cases. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: AilinKid, chrysan, easonn7, time-and-fate, XuHuaiyu 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 |
/retest |
What problem does this PR solve?
Issue Number: close #33559
Problem Summary:
queries with the same plan have different plan_digest in information_schema.statement_summary
What is changed and how it works?
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.