-
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
add builtin-reverse func #1224
add builtin-reverse func #1224
Conversation
Expect string | ||
}{ | ||
{"abc", "cba"}, | ||
{"LIKE", "EKIL"}, |
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.
Please add more cases such as reverse(null), reverse(123).
Please add test case for type inference here: https://github.com/pingcap/tidb/blob/master/optimizer/typeinferer_test.go#L35 |
@@ -56,6 +56,7 @@ TEMP_FILE = temp_parser_file | |||
parser: | |||
go get github.com/qiuyesuifeng/goyacc | |||
go get github.com/qiuyesuifeng/golex | |||
go get github.com/golang/example/stringutil |
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.
We use vendor to solve dependency. Should we add it into .vendor? @coocood
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.
It's an example package, it's not supposed to be imported.
@mrmiywj |
23b56f1
to
7b92882
Compare
LGTM |
| "REVERSE" '(' Expression ')' | ||
{ | ||
$$ = &ast.FuncCallExpr{FnName: model.NewCIStr($1.(string)), Args: []ast.ExprNode{$3.(ast.ExprNode)}} | ||
} |
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.
In parser.y and scanner.y, we use tab to align the code.
Please change spaces to tabs.
7b92882
to
46029ea
Compare
cc @coocood |
PTAL @coocood |
@@ -445,6 +445,7 @@ references {r}{e}{f}{e}{r}{e}{n}{c}{e}{s} | |||
regexp {r}{e}{g}{e}{x}{p} | |||
replace {r}{e}{p}{l}{a}{c}{e} | |||
redundant {r}{e}{d}{u}{n}{d}{a}{n}{t} | |||
reverse {r}{e}{v}{e}{r}{s}{e} |
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.
Seems it is not aligned.
46029ea
to
6d324ca
Compare
cc @shenli |
@mrmiywj |
6d324ca
to
eea7690
Compare
cc @coocood |
@mrmiywj |
also missed a tab before line 2567 |
fix nits change spaces to tab fix indent fix indents fix indent
eea7690
to
ee46ebf
Compare
cc @coocood |
@mrmiywj |
cc @coocood |
LGTM |
…or GRANT CREATE USER ON <specific db>.* (pingcap#1224) * add StaticGlobalOnlyPrivs * fix
…or GRANT CREATE USER ON <specific db>.* (pingcap#1224) * add StaticGlobalOnlyPrivs * fix
…or GRANT CREATE USER ON <specific db>.* (#1224) * add StaticGlobalOnlyPrivs * fix
#310