-
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
expression: pushdown substring/char_length to tikv #30191
Conversation
Signed-off-by: guo-shaoge <shaoge1994@163.com>
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
/run-integration-copr-test tikv=pr/11494 |
…n_substring Signed-off-by: guo-shaoge <shaoge1994@163.com> Conflicts: expression/expression.go
/run-check_dev_2 |
/run-check_dev_2 |
expression/expression.go
Outdated
@@ -966,7 +966,7 @@ func scalarExprSupportedByTiKV(sf *ScalarFunction) bool { | |||
|
|||
// string functions. | |||
ast.Length, ast.BitLength, ast.Concat, ast.ConcatWS /*ast.Locate,*/, ast.Replace, ast.ASCII, ast.Hex, | |||
ast.Reverse, ast.LTrim, ast.RTrim /*ast.Left,*/, ast.Strcmp, ast.Space, ast.Elt, ast.Field, | |||
ast.Reverse, ast.LTrim, ast.RTrim /*ast.Left,*/, ast.Strcmp, ast.Space, ast.Elt, ast.Field, ast.Substring, |
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.
How about MID() and SubStr() ?
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.
done
Related tikv pr: tikv/tikv#11494 |
fixSigned-off-by: guo-shaoge <shaoge1994@163.com>
…pushdown_substring
@@ -3472,36 +3472,36 @@ func TestExprPushdown(t *testing.T) { | |||
"(4,'511111','611',7,8,9),(5,'611111','711',8,9,10)") | |||
|
|||
// case 1, index scan without double read, some filters can not be pushed to cop task | |||
rows := tk.MustQuery("explain format = 'brief' select col2, col1 from t use index(key1) where col2 like '5%' and substr(col1, 1, 1) = '4'").Rows() | |||
rows := tk.MustQuery("explain format = 'brief' select col2, col1 from t use index(key1) where col2 like '5%' and from_base64(to_base64(substr(col1, 1, 1))) = '4'").Rows() | |||
require.Equal(t, "root", fmt.Sprintf("%v", rows[1][2])) |
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.
from_base64
and to_base64
has no plan to pushdown for now...
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 looks so dirty...
/run-check_dev_2 |
/run-unit-test |
Code Coverage Details: https://codecov.io/github/pingcap/tidb/commit/57107673fb2ae57f791f85f8c09c974564b3c5fb |
/run-check_dev_2 |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 43203b7
|
/run-unit-test |
1 similar comment
/run-unit-test |
@guo-shaoge: Your PR was out of date, I have automatically updated it for you. At the same time I will also trigger all tests for you: /run-all-tests If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes. 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 ti-community-infra/tichi repository. |
/run-mysql-test |
Signed-off-by: guo-shaoge shaoge1994@163.com
What problem does this PR solve?
Issue Number: close #31125 #30200
Problem Summary:
What is changed and how it works?
Check List
Tests
Side effects
Documentation
Release note