-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add batching api for groups #3698
base: master
Are you sure you want to change the base?
Conversation
@generall Do you think this is going in the right direction? |
@@ -34,6 +34,21 @@ where | |||
{ | |||
/// Creates a basic GroupBy builder | |||
pub fn new(group_by: GroupRequest, collection: &'a Collection, collection_by_name: F) -> Self { |
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 left this signature as is to avoid changing too much in the tests.
@@ -176,7 +176,38 @@ impl TableOfContent { | |||
group_by | |||
.execute() | |||
.await | |||
.map(|groups| GroupsResult { groups }) | |||
.map(|mut groups| GroupsResult { | |||
groups: groups.pop().unwrap_or_default(), |
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.
In this case, execute
should always return one element. Would it be preferable to return an error or use unwrap()
instead of unwrap_or_default()
?
@@ -176,7 +176,38 @@ impl TableOfContent { | |||
group_by |
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 can rewrite fn group
to use fn group_batch
The PR adds the batching API for groups. Closes: #2326
This is still a draft to get some feedback on the direction of this PR.
The current change adds support for batching groups API.
GRPC, Openapi and tests are still missing.
All Submissions:
dev
branch. Did you create your branch fromdev
?New Feature Submissions:
cargo +nightly fmt --all
command prior to submission?cargo clippy --all --all-features
command?Changes to Core Features: