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

plan: always clone Expression when set it to plan. #6263

Merged
merged 6 commits into from
Apr 13, 2018

Conversation

winoros
Copy link
Member

@winoros winoros commented Apr 10, 2018

Current master can be panicked by the test added.
PTAL @XuHuaiyu @zz-jason @lamxTyler
Better be merged after #6260 and #6262

@ngaut ngaut changed the title plan: alway clone Expression when set it to plan. plan: always clone Expression when set it to plan. Apr 10, 2018
@zz-jason
Copy link
Member

After #6260 and #6262 merged, we'd better evaluate the impact on sysbench of this patch.

@zz-jason
Copy link
Member

/run-all-tests

@@ -133,8 +133,14 @@ func (p *LogicalJoin) PredicatePushDown(predicates []expression.Expression) (ret
case InnerJoin:
p.LeftConditions = nil
p.RightConditions = nil
p.EqualConditions = equalCond
p.OtherConditions = otherCond
p.EqualConditions = make([]*expression.ScalarFunction, 0, len(equalCond))
Copy link
Contributor

Choose a reason for hiding this comment

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

p.EqualConditions = make([]*expression.ScalarFunction, len(equalCond)) ?

We need fulfill expression later anyway.

Copy link
Member Author

Choose a reason for hiding this comment

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

Will this change affect too much?

Copy link
Member

Choose a reason for hiding this comment

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

I think it's ok to use append.
We don't need to think if make full length is applicable, we can safely use append.

Copy link
Contributor

Choose a reason for hiding this comment

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

I won't change as much. It is just neat to use the way I proposed.

Copy link
Contributor

Choose a reason for hiding this comment

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

And yes. It's perfect fine to use append.

@XuHuaiyu
Copy link
Contributor

LGTM

Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

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

LGTM

@zz-jason
Copy link
Member

/run-all-tests

@winoros winoros added status/LGT1 Indicates that a PR has LGTM 1. type/bugfix This PR fixes a bug. priority/release-blocker This issue blocks a release. Please solve it ASAP. all-tests-passed status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Apr 13, 2018
@winoros winoros merged commit f890b85 into pingcap:master Apr 13, 2018
@winoros winoros deleted the ppd-bug branch April 13, 2018 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/release-blocker This issue blocks a release. Please solve it ASAP. status/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants