Skip to content
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

[FR] [Firestore] Statistics aggregation function #1956

Open
Thaina opened this issue Dec 9, 2023 · 1 comment
Open

[FR] [Firestore] Statistics aggregation function #1956

Thaina opened this issue Dec 9, 2023 · 1 comment
Assignees
Labels
api: firestore Issues related to the googleapis/nodejs-firestore API. priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@Thaina
Copy link

Thaina commented Dec 9, 2023

Is your feature request related to a problem? Please describe.

Since firestore now has aggregate function. In addition to sum() count() and average() I would like to propose that we should have an aggregate function that will return both .count .sum .sumSquare in the same query. And so we can calculated both average and standard deviation along with presenting all statistics related value in one query

Describe the solution you'd like
There should be stats() function that return .count .sum .sumSquare and maybe .min .max in the returned aggregated object

Describe alternatives you've considered
Without aggregated function there are no optimal way to calculate standard deviation
Or could there possibly be custom aggregate function like couchdb in firebase system?

Additional context
This is actually borrowed idea from couchdb _stats function

@Thaina Thaina added priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels Dec 9, 2023
@product-auto-label product-auto-label bot added the api: firestore Issues related to the googleapis/nodejs-firestore API. label Dec 9, 2023
@ehsannas
Copy link
Contributor

Thanks for the recommendation @Thaina. I'll bring this up with the team.

@ehsannas ehsannas self-assigned this Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: firestore Issues related to the googleapis/nodejs-firestore API. priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

2 participants