-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
Conversation
Expression
when set it to plan.Expression
when set it to plan.
/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)) |
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.
p.EqualConditions = make([]*expression.ScalarFunction, len(equalCond))
?
We need fulfill expression later anyway.
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.
Will this change affect too much?
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.
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.
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.
I won't change as much. It is just neat to use the way I proposed.
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.
And yes. It's perfect fine to use append.
LGTM |
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-tests |
Current master can be panicked by the test added.
PTAL @XuHuaiyu @zz-jason @lamxTyler
Better be merged after #6260 and #6262