Skip to content
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: enable dayname/monthname function push down for tiflash #32595

Merged
merged 50 commits into from
Feb 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
a2dc3eb
Fix greatest/least issue when handling duration type
Dec 21, 2021
29185d6
Fix some greatest/least function incorrect behavior when mixed types
yibin87 Dec 23, 2021
4a29734
Fix greatest/least issue when handling duration type
yibin87 Dec 21, 2021
56e033c
merge changes from trunk
yibin87 Dec 23, 2021
545dec2
Separate GreatestTime and GreatestDate, LeastTime and LeastDate, and …
yibin87 Dec 27, 2021
5ffc3a6
Merge branch 'master' of github.com:yibin87/tidb
yibin87 Dec 27, 2021
a4d5db5
Merge branch 'master' into master
yibin87 Dec 28, 2021
fb273c7
Add support for vector greatest/least functions
yibin87 Dec 28, 2021
2dac27c
Merge branch 'master' of github.com:yibin87/tidb
yibin87 Dec 28, 2021
e1574b1
make format
yibin87 Dec 28, 2021
5c4aef3
Format enum definitions
yibin87 Dec 28, 2021
6ad60a3
Format enum definitions
yibin87 Dec 28, 2021
3003a03
Format enum definitions
yibin87 Dec 28, 2021
9e571ff
Format change
yibin87 Dec 29, 2021
18244f0
Format change
yibin87 Dec 29, 2021
f1fc032
Format change
yibin87 Dec 29, 2021
367ab6e
Refact code and add vec test cases
yibin87 Dec 29, 2021
630983e
Merge branch 'master' into master
yibin87 Dec 29, 2021
b745867
Fmt changes
yibin87 Dec 29, 2021
1e11ca0
Modify comment to trigger unit test
yibin87 Dec 29, 2021
d4505c3
Adjust import sequence
yibin87 Dec 30, 2021
3ba6f5d
Merge branch 'master' into master
ti-chi-bot Dec 30, 2021
de2240f
Merge branch 'master' into master
ti-chi-bot Dec 30, 2021
a6addf6
Merge branch 'master' into master
ti-chi-bot Dec 30, 2021
fa47deb
Merge branch 'master' into master
ti-chi-bot Dec 30, 2021
88fd4d6
Fix mysql test json case
yibin87 Dec 30, 2021
6bbb43d
Merge branch 'master' of github.com:yibin87/tidb
yibin87 Dec 30, 2021
6ba4c28
Merge branch 'master' into master
yibin87 Dec 30, 2021
356c372
Add JSON tests
yibin87 Dec 30, 2021
2fabae4
Merge branch 'master' of github.com:yibin87/tidb
yibin87 Dec 30, 2021
8d13364
Merge branch 'pingcap:master' into master
yibin87 Jan 6, 2022
feb8f47
Fix wrap cast function that droped nullable information
yibin87 Jan 6, 2022
08f0dc0
Add plan test
yibin87 Jan 7, 2022
7e9bb6b
Refact
yibin87 Jan 7, 2022
ea8e167
Refact
yibin87 Jan 7, 2022
bb968ae
Move nullable check to lower level implementations
yibin87 Jan 7, 2022
3682c9c
Merge branch 'master' into master
hawkingrei Jan 24, 2022
cfde28a
Fix a uint/int 0 not equal issue in remote unit test
yibin87 Jan 24, 2022
baef760
Merge branch 'master' of github.com:yibin87/tidb
yibin87 Jan 24, 2022
a2780a0
Merge branch 'master' into master
ti-chi-bot Jan 24, 2022
f1cb4c3
Merge branch 'master' into master
ti-chi-bot Jan 24, 2022
765e25a
Merge branch 'master' into master
ti-chi-bot Jan 24, 2022
091a5e4
Merge branch 'master' into master
yibin87 Jan 24, 2022
55f0309
Merge branch 'master' into master
yibin87 Jan 24, 2022
d40ad26
enable DayName/MonthName function push-down for tiflash
yibin87 Feb 23, 2022
274dd57
Merge branch 'master' of github.com:yibin87/tidb
yibin87 Feb 23, 2022
1636191
Merge branch 'pingcap:master' into master
yibin87 Feb 24, 2022
91aa3a6
Add push-down unit test for dayname/monthname
yibin87 Feb 24, 2022
3fc5eee
Merge branch 'master' of github.com:yibin87/tidb
yibin87 Feb 24, 2022
b523236
Merge branch 'master' into master
ti-chi-bot Feb 25, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions expression/expr_to_pb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1014,6 +1014,16 @@ func TestExprPushDownToFlash(t *testing.T) {
require.NoError(t, err)
exprs = append(exprs, function)

// DayName: supported
function, err = NewFunction(mock.NewContext(), ast.DayName, types.NewFieldType(mysql.TypeString), datetimeColumn)
require.NoError(t, err)
exprs = append(exprs, function)

// MonthName: supported
function, err = NewFunction(mock.NewContext(), ast.MonthName, types.NewFieldType(mysql.TypeString), datetimeColumn)
require.NoError(t, err)
exprs = append(exprs, function)

pushed, remained = PushDownExprs(sc, exprs, client, kv.TiFlash)
require.Len(t, pushed, len(exprs))
require.Len(t, remained, 0)
Expand Down
2 changes: 1 addition & 1 deletion expression/expression.go
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,7 @@ func scalarExprSupportedByFlash(function *ScalarFunction) bool {
ast.Plus, ast.Minus, ast.Div, ast.Mul, ast.Abs, ast.Mod,
ast.If, ast.Ifnull, ast.Case,
ast.Concat, ast.ConcatWS,
ast.Date, ast.Year, ast.Month, ast.Day, ast.Quarter,
ast.Date, ast.Year, ast.Month, ast.Day, ast.Quarter, ast.DayName, ast.MonthName,
ast.DateDiff, ast.TimestampDiff, ast.DateFormat, ast.FromUnixTime,

ast.Sqrt, ast.Log, ast.Log2, ast.Log10, ast.Ln, ast.Exp, ast.Pow, ast.Sign,
Expand Down