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: remove "self" field in "baseBuiltinFunc" completely #4766

Merged
merged 3 commits into from
Oct 13, 2017

Conversation

zz-jason
Copy link
Member

No description provided.

@zz-jason
Copy link
Member Author

@coocood PTAL

@XuHuaiyu
Copy link
Contributor

LGTM

@XuHuaiyu XuHuaiyu added the status/LGT1 Indicates that a PR has LGTM 1. label Oct 13, 2017
@@ -27,6 +27,50 @@ import (
"github.com/pingcap/tidb/util/types"
)

type mockBuiltinFunc struct {
Copy link
Member

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.

Copy link
Member Author

@zz-jason zz-jason Oct 13, 2017

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.

Copy link
Member

@coocood coocood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@coocood
Copy link
Member

coocood commented Oct 13, 2017

/run-all-test

@ngaut
Copy link
Member

ngaut commented Oct 13, 2017

Well done.

@coocood coocood merged commit 64bc8cb into master Oct 13, 2017
@coocood coocood deleted the zz-jason/remove/eval branch October 13, 2017 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/LGT1 Indicates that a PR has LGTM 1.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants