-
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: make query case-insensitive for infoschema tables #56989
Conversation
Hi @joechenrh. 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-sigs/prow repository. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #56989 +/- ##
================================================
+ Coverage 73.2196% 73.6070% +0.3874%
================================================
Files 1650 1672 +22
Lines 455460 483660 +28200
================================================
+ Hits 333486 356008 +22522
- Misses 101497 106353 +4856
- Partials 20477 21299 +822
Flags with carried forward coverage won't be shown. Click here to find out more.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/ok-to-test |
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 PR should be merged with adding a clarification in the documentation to let the user know infoschema tables are case-insensitive in some scenarios and the rewriting makes the execution plan different
rewrited := make([]expression.Expression, 0, len(remained)) | ||
for _, expr := range remained { | ||
newExpr := e.convertToLowerInExpression(ctx, expr) | ||
rewrited = append(rewrited, newExpr) | ||
} | ||
return rewrited |
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.
rewrited := make([]expression.Expression, 0, len(remained)) | |
for _, expr := range remained { | |
newExpr := e.convertToLowerInExpression(ctx, expr) | |
rewrited = append(rewrited, newExpr) | |
} | |
return rewrited | |
for i, expr := range remained { | |
remained[i] = e.convertToLowerInExpression(ctx, expr) | |
} | |
return |
func extractColumn( | ||
expr expression.Expression, | ||
supportPushdown bool, | ||
) (*expression.Column, bool) { |
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 2nd return value seems unnecessary.
ctx base.PlanContext, | ||
extractCols map[int64]*types.FieldName, | ||
expr *expression.ScalarFunction, | ||
) (string, []types.Datum) { | ||
var ( | ||
scalarIdx = 1 |
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.
Should the variable name be constIdx
?
@joechenrh: The following tests failed, say
Full PR test history. Your PR dashboard. 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-sigs/prow repository. I understand the commands that are listed here. |
@joechenrh: The following test failed, say
Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
What problem does this PR solve?
Issue Number: close #56987 ref #50305
Problem Summary:
What changed and how does it work?
pushedDownFuncs
since infoschema tables are case-insensitive.Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.