-
Notifications
You must be signed in to change notification settings - Fork 3
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
implement aggregations on nested fields #136
implement aggregations on nested fields #136
Conversation
This reverts commit d29fe8a.
…mpose config" This reverts commit 308e841.
) -> impl Iterator<Item = (AggregationFunction, Type)> { | ||
let nullable_scalar_type = move || Type::Nullable { | ||
underlying_type: Box::new(bson_to_named_type(scalar_type)), | ||
}; |
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.
Not blocking, but is this useful in other areas as well?
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.
It could be slightly useful to have a method on ndc_models::Type
that does this. That would be a change in the ndc-spec repo. In the connector code we already have configuration::Type::make_nullable
.
Turns on the nested field aggregation connector capability, and makes it work.
This also touches up the aggregation implementation generally. It uses the updated, unified system for referencing fields with paths. It also changes aggregation result types (besides count) to be nullable which avoids an error when aggregating over an empty document set.