-
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: new plan support hash aggregation. #3093
Conversation
if task != nil { | ||
return task, nil | ||
} | ||
task, err = p.convert2HashAggregation(prop) |
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.
We will support streaming aggregation latter?
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.
yeah
} | ||
partialAgg = p.Copy().(*PhysicalAggregation) | ||
// TODO: It's toooooo ugly here. Refactor in the future !! | ||
gkType := types.NewFieldType(mysql.TypeBlob) |
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.
This is ported from old code?
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.
yeah
plan/task_profile.go
Outdated
gkType.Collate = charset.CollationBin | ||
partialSchema := expression.NewSchema(&expression.Column{RetType: gkType, FromID: p.id, Index: 0}) | ||
cursor := 0 | ||
newAggFuncs := make([]expression.AggregationFunction, len(finalAgg.AggFuncs)) |
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.
finalAggFunc
is a more consistent name.
rest 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
Now we only support hash aggregation.
@shenli @coocood @zimulala @tiancaiamao PTAL