-
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
expression: remove "self" field in "baseBuiltinFunc" completely #4766
Conversation
@coocood PTAL |
LGTM |
expression/builtin_test.go
Outdated
@@ -27,6 +27,50 @@ import ( | |||
"github.com/pingcap/tidb/util/types" | |||
) | |||
|
|||
type mockBuiltinFunc struct { |
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.
Strictly speaking, this not a mock.
How about simply define a function that evals the builtinFunc
.
func evalBuiltinFunc(bf builtinFunc) (d types.Datum, err error)
Since the row
argument is always nil, we don't need to add in evalBuiltinFunc
.
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.
ok, but not all the row
argument are nil, we still need to keep it.
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.
LGTM
/run-all-test |
Well done. |
No description provided.