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

fix(firestore, iOS): account for filters in getAggregateFromServer with collection groups #8259

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

SelaseKay
Copy link
Collaborator

Related issues

Fixes #8253

Release Summary

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
    • Yes
  • My change supports the following platforms;
    • Android
    • iOS
  • My change includes tests;
    • e2e tests added or updated in packages/\*\*/e2e
    • jest tests added or updated in packages/\*\*/__tests__
  • I have updated TypeScript types that are affected by my change.
  • This is a breaking change;
    • Yes
    • No

Test Plan


Think react-native-firebase is great? Please consider supporting the project with any of the below:

Copy link

vercel bot commented Jan 31, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-native-firebase ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 31, 2025 5:48pm

@CLAassistant
Copy link

CLAassistant commented Jan 31, 2025

CLA assistant check
All committers have signed the CLA.

@SelaseKay SelaseKay changed the title "fix(firestore,iOS): account for filters in getAggregateFromServer with collection groups" "fix(firestore, iOS): account for filters in getAggregateFromServer with collection groups" Jan 31, 2025
@SelaseKay SelaseKay changed the title "fix(firestore, iOS): account for filters in getAggregateFromServer with collection groups" fix(firestore, iOS): account for filters in getAggregateFromServer with collection groups Jan 31, 2025
Copy link
Member

@russellwheatley russellwheatley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one! Worth creating a couple of e2e tests specifically for collectionGroup here: https://github.com/invertase/react-native-firebase/blob/vertexai/packages/firestore/e2e/Aggregate/AggregateQuery.e2e.js#L103

Create a separate describe('collectionGroup') , and test count(), average() and sum() to ensure they all work 😄

@SelaseKay
Copy link
Collaborator Author

@russellwheatley, added test.

@russellwheatley
Copy link
Member

@SelaseKay - Could you format the file? Might be able to do it in the file with keyboard shortcut. Alternatively, run yarn lint:js. It's a touch unreadable. also - merge with main. Cheers 😄

Copy link
Member

@russellwheatley russellwheatley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment

@SelaseKay
Copy link
Collaborator Author

@russellwheatley , resolved

@russellwheatley
Copy link
Member

@SelaseKay - did you merge with main? I'm seeing code that is already in main branch.

@SelaseKay
Copy link
Collaborator Author

@russellwheatley, merged main into firestore_8253 and pushed

Copy link
Collaborator

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great to me @SelaseKay - nice

I left a confirmation comment for the original issue reporter to make certain the fix was only needed for iOS. By my analysis this is the complete fix because I think android was already working correctly but best to ask... #8253 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: getAggregateFromServer does not consider any where clauses attached to its query
4 participants