-
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
plan: fix a bug in index join #7150
Conversation
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
ci failed @winoros |
/run-all-tests |
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
expression/explain.go
Outdated
@@ -60,12 +61,26 @@ func (expr *Constant) format(dt types.Datum) string { | |||
} | |||
|
|||
// ExplainExpressionList generates explain information for a list of expressions. | |||
func ExplainExpressionList(exprs []Expression) []byte { | |||
func ExplainExpressionList(exprs []Expression, needSort bool) []byte { |
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.
add a comment for needSort
@XuHuaiyu PTAL |
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
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
expression/explain.go
Outdated
@@ -60,12 +61,28 @@ func (expr *Constant) format(dt types.Datum) string { | |||
} | |||
|
|||
// ExplainExpressionList generates explain information for a list of expressions. | |||
func ExplainExpressionList(exprs []Expression) []byte { | |||
// needSort will be true if the exprs should keep its order. In some scenarios, the expr's order may not be valid |
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.
why the order of the exprs
may not be valid?
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.
There's map access when extract same part from DNF. So the order after this cannot be valid.
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.
Uh, I think stable
is a better word. By the way, this function only used when we explain
a sql, and the performance doesn't matter, I think we can force to sort the exprs
to simplify the function signature, and this function can be renamed to SortAndExplainExpressionList
.
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
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
What have you changed? (mandatory)
wrongly usage of golang's
copy
What is the type of the changes? (mandatory)
How has this PR been tested? (mandatory)
newly added explain test.