Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
jiawen li
tidb
Commits
0e043c67
Unverified
Commit
0e043c67
authored
3 years ago
by
Song Gao
Committed by
GitHub
3 years ago
Browse files
Options
Download
Email Patches
Plain Diff
expr: fix instr function get stuck (#33380)
close pingcap/tidb#33367
parent
5a176047
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
expression/expr_to_pb_test.go
+0
-5
expression/expr_to_pb_test.go
expression/expression.go
+1
-1
expression/expression.go
planner/core/integration_test.go
+0
-4
planner/core/integration_test.go
with
1 addition
and
10 deletions
+1
-10
expression/expr_to_pb_test.go
+
0
-
5
View file @
0e043c67
...
...
@@ -1386,11 +1386,6 @@ func TestExprPushDownToTiKV(t *testing.T) {
retType
:
types
.
NewFieldType
(
mysql
.
TypeString
),
args
:
[]
Expression
{
stringColumn
,
stringColumn
,
intColumn
},
},
{
functionName
:
ast
.
Instr
,
retType
:
types
.
NewFieldType
(
mysql
.
TypeInt24
),
args
:
[]
Expression
{
stringColumn
,
stringColumn
},
},
{
functionName
:
ast
.
Quote
,
retType
:
types
.
NewFieldType
(
mysql
.
TypeString
),
...
...
This diff is collapsed.
Click to expand it.
expression/expression.go
+
1
-
1
View file @
0e043c67
...
...
@@ -970,7 +970,7 @@ func scalarExprSupportedByTiKV(sf *ScalarFunction) bool {
// string functions.
ast
.
Bin
,
ast
.
Unhex
,
ast
.
Locate
,
ast
.
Ord
,
ast
.
Lpad
,
ast
.
Rpad
,
ast
.
Trim
,
ast
.
FromBase64
,
ast
.
ToBase64
,
ast
.
Upper
,
ast
.
Lower
,
ast
.
InsertFunc
,
ast
.
MakeSet
,
ast
.
SubstringIndex
,
ast
.
Instr
,
ast
.
Quote
,
ast
.
Oct
,
ast
.
MakeSet
,
ast
.
SubstringIndex
/*
ast.Instr
*/
,
ast
.
Quote
,
ast
.
Oct
,
ast
.
FindInSet
,
ast
.
Repeat
,
ast
.
Length
,
ast
.
BitLength
,
ast
.
Concat
,
ast
.
ConcatWS
,
ast
.
Replace
,
ast
.
ASCII
,
ast
.
Hex
,
ast
.
Reverse
,
ast
.
LTrim
,
ast
.
RTrim
,
ast
.
Strcmp
,
ast
.
Space
,
ast
.
Elt
,
ast
.
Field
,
...
...
This diff is collapsed.
Click to expand it.
planner/core/integration_test.go
+
0
-
4
View file @
0e043c67
...
...
@@ -2912,10 +2912,6 @@ func TestScalarFunctionPushDown(t *testing.T) {
tk
.
MustQuery
(
"explain analyze select /*+read_from_storage(tikv[t])*/ * from t where substring_index(c,c,1)"
)
.
CheckAt
([]
int
{
0
,
3
,
6
},
rows
)
rows
[
1
][
2
]
=
"instr(test.t.c, test.t.c)"
tk
.
MustQuery
(
"explain analyze select /*+read_from_storage(tikv[t])*/ * from t where instr(c,c)"
)
.
CheckAt
([]
int
{
0
,
3
,
6
},
rows
)
rows
[
1
][
2
]
=
"quote(test.t.c)"
tk
.
MustQuery
(
"explain analyze select /*+read_from_storage(tikv[t])*/ * from t where quote(c)"
)
.
CheckAt
([]
int
{
0
,
3
,
6
},
rows
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment