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, plan: improve fold constant #4721

Merged
merged 6 commits into from Oct 9, 2017

Conversation

Projects
None yet
5 participants
@XuHuaiyu
Contributor

XuHuaiyu commented Oct 9, 2017

We do not need to traverse the expression tree every time when folding constant.

for condition like:
`a or a or a or a or a or a or a or a or a or a`

BenchmarkFoldConstantBefore-4          100000             17296 ns/op
BenchmarkFoldConstantInAfter-4        100000             14927 ns/op

PTAL @winkyao @hanfei1991 @zz-jason

@zz-jason

This comment has been minimized.

Show comment
Hide comment
@zz-jason

zz-jason Oct 9, 2017

Member

LGTM

Member

zz-jason commented Oct 9, 2017

LGTM

@XuHuaiyu

This comment has been minimized.

Show comment
Hide comment
@XuHuaiyu

XuHuaiyu Oct 9, 2017

Contributor

PTAL @hanfei1991
/run-all-test

Contributor

XuHuaiyu commented Oct 9, 2017

PTAL @hanfei1991
/run-all-test

@XuHuaiyu

This comment has been minimized.

Show comment
Hide comment
@XuHuaiyu

XuHuaiyu Oct 9, 2017

Contributor
Contributor

XuHuaiyu commented Oct 9, 2017

@XuHuaiyu XuHuaiyu added the status/LGT2 label Oct 9, 2017

Merge branch 'master' of https://github.com/pingcap/tidb into xhy/fol…
…dconstant

Conflicts:
	expression/builtin_cast.go
@coocood

coocood approved these changes Oct 9, 2017

@coocood coocood merged commit e11c4fb into master Oct 9, 2017

3 of 4 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
ci/circleci Your tests passed on CircleCI!
Details
jenkins-ci-tidb/build Jenkins job succeeded.
Details
license/cla Contributor License Agreement is signed.
Details

@coocood coocood deleted the xhy/foldconstant branch Oct 9, 2017

mccxj added a commit to mccxj/tidb that referenced this pull request Oct 10, 2017

expression, plan: improve fold constant (#4721)
* improve fold constant

* remove useless code

* remove useless argument

* address comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment