Skip to content

Conversation

wu-hui
Copy link
Contributor

@wu-hui wu-hui commented Sep 9, 2025

No description provided.

Copy link
Contributor

github-actions bot commented Sep 9, 2025

Firebase AI Mock Responses Check ⚠️

A newer major version of the mock responses for Firebase AI unit tests is available. update_responses.sh should be updated to clone the latest version of the responses: v14.9

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Summary of Changes

Hello @wu-hui, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a foundational new data processing and query framework, known as 'Pipelines', to Firestore. This feature significantly expands the capabilities for server-side data manipulation, allowing users to perform complex transformations, aggregations, and advanced filtering operations that go beyond traditional query limitations. The implementation includes a new expression evaluation engine and ensures compatibility with existing query patterns, providing a flexible and powerful tool for data management.

Highlights

  • New Pipelines API: Introduced a powerful new 'Pipelines' API for advanced query and data transformation capabilities within Firestore. This API allows for complex data manipulation and aggregation directly on the server.
  • Expanded Query Operations: The new Pipelines API supports a wide array of operations including aggregation (count, sum, average), advanced filtering (logical, comparison, array, string, regex), data transformation (add/remove fields, select, replace), and structural operations (unnest, union).
  • Integration with Existing Queries: Existing Firestore Query objects can now be converted into the new Pipeline format, ensuring compatibility and providing a migration path for enhanced functionality.
  • Kotlin-based Expression Engine: A new Kotlin-based expression evaluation engine has been implemented to power the Pipelines API, enabling robust and extensible data processing logic.
  • Internal Refinements: Significant internal refactoring was performed across various modules, including number comparison helpers, document/field path handling, and value serialization, to support the new pipeline architecture.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a significant new feature: a Pipeline API for Firestore queries. This provides a more expressive and flexible way to query data, similar to aggregation pipelines in other databases. The changes are extensive, including the new fluent API, the underlying execution logic, a compatibility layer to convert existing Query objects, and a comprehensive suite of tests. Overall, this is a well-implemented feature. I've identified one critical compatibility issue and a few minor issues in the test files.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Sep 9, 2025

Coverage Report 1

Affected Products

No changes between base commit (7999ab4) and merge commit (7a9c551).

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/8XgVihGQEW.html

Copy link
Contributor

github-actions bot commented Sep 9, 2025

Test Results

0 tests   0 ✅  0s ⏱️
0 suites  0 💤
0 files    0 ❌

Results for commit 537313a.

♻️ This comment has been updated with latest results.

@google-oss-bot
Copy link
Contributor

The public api surface has changed for the subproject firebase-firestore:
error: Added method com.google.firebase.firestore.FirebaseFirestore.realtimePipeline() [AddedMethod]
error: Added method com.google.firebase.firestore.Pipeline.execute(com.google.firebase.firestore.pipeline.PipelineOptions) [AddedMethod]
error: Removed method com.google.firebase.firestore.Pipeline.execute(com.google.firebase.firestore.pipeline.RealtimePipelineOptions) [RemovedMethod]
error: Removed method com.google.firebase.firestore.RealtimePipeline.execute() [RemovedMethod]
error: Removed method com.google.firebase.firestore.RealtimePipeline.execute(com.google.firebase.firestore.pipeline.PipelineOptions) [RemovedMethod]
error: Removed method com.google.firebase.firestore.pipeline.AbstractOptions.with(String,com.google.firebase.firestore.pipeline.GenericOptions) [RemovedMethod]
error: Added method com.google.firebase.firestore.pipeline.AbstractOptions.with(String,com.google.firebase.firestore.pipeline.RawOptions) [AddedMethod]
error: Removed class com.google.firebase.firestore.pipeline.ExplainOptions [RemovedClass]
error: Added method com.google.firebase.firestore.pipeline.Expr.mapGet(com.google.firebase.firestore.pipeline.Expr) [AddedMethod]
error: Attempted to change parameter name from key to keyExpression in method com.google.firebase.firestore.pipeline.Expr.mapRemove [ParameterNameChange]
error: Added method com.google.firebase.firestore.pipeline.ExprWithAlias.getAlias() [AddedMethod]
error: Added method com.google.firebase.firestore.pipeline.ExprWithAlias.getExpr() [AddedMethod]
error: Removed class com.google.firebase.firestore.pipeline.GenericOptions [RemovedClass]
error: Removed method com.google.firebase.firestore.pipeline.PipelineOptions.withExplainOptions(com.google.firebase.firestore.pipeline.ExplainOptions) [RemovedMethod]
error: Added class com.google.firebase.firestore.pipeline.RawOptions [AddedClass]
error: Removed method com.google.firebase.firestore.pipeline.Stage.getName() [RemovedMethod]
error: Removed method com.google.firebase.firestore.pipeline.Stage.with(String,String) [RemovedMethod]
error: Removed method com.google.firebase.firestore.pipeline.Stage.with(String,boolean) [RemovedMethod]
error: Removed method com.google.firebase.firestore.pipeline.Stage.with(String,com.google.firebase.firestore.pipeline.Field) [RemovedMethod]
error: Removed method com.google.firebase.firestore.pipeline.Stage.with(String,double) [RemovedMethod]
error: Removed method com.google.firebase.firestore.pipeline.Stage.with(String,error.NonExistentClass) [RemovedMethod]
error: Removed method com.google.firebase.firestore.pipeline.Stage.with(String,long) [RemovedMethod]
error: Added method com.google.firebase.firestore.pipeline.Stage.withOption(String,String) [AddedMethod]
error: Added method com.google.firebase.firestore.pipeline.Stage.withOption(String,boolean) [AddedMethod]
error: Added method com.google.firebase.firestore.pipeline.Stage.withOption(String,com.google.firebase.firestore.pipeline.Field) [AddedMethod]
error: Added method com.google.firebase.firestore.pipeline.Stage.withOption(String,double) [AddedMethod]
error: Added method com.google.firebase.firestore.pipeline.Stage.withOption(String,error.NonExistentClass) [AddedMethod]
error: Added method com.google.firebase.firestore.pipeline.Stage.withOption(String,long) [AddedMethod]

Please update the api.txt files for the subprojects being affected by this change by running ./gradlew ${subproject}:generateApiTxtFile. Also perform a major/minor bump accordingly.

@google-oss-bot
Copy link
Contributor

The public api surface has changed for the subproject firebase-firestore:
error: Added method com.google.firebase.firestore.FirebaseFirestore.realtimePipeline() [AddedMethod]
error: Added method com.google.firebase.firestore.Pipeline.execute(com.google.firebase.firestore.pipeline.PipelineOptions) [AddedMethod]
error: Removed method com.google.firebase.firestore.Pipeline.execute(com.google.firebase.firestore.pipeline.RealtimePipelineOptions) [RemovedMethod]
error: Removed method com.google.firebase.firestore.RealtimePipeline.execute() [RemovedMethod]
error: Removed method com.google.firebase.firestore.RealtimePipeline.execute(com.google.firebase.firestore.pipeline.PipelineOptions) [RemovedMethod]
error: Removed method com.google.firebase.firestore.pipeline.AbstractOptions.with(String,com.google.firebase.firestore.pipeline.GenericOptions) [RemovedMethod]
error: Added method com.google.firebase.firestore.pipeline.AbstractOptions.with(String,com.google.firebase.firestore.pipeline.RawOptions) [AddedMethod]
error: Removed class com.google.firebase.firestore.pipeline.ExplainOptions [RemovedClass]
error: Added method com.google.firebase.firestore.pipeline.Expr.mapGet(com.google.firebase.firestore.pipeline.Expr) [AddedMethod]
error: Attempted to change parameter name from key to keyExpression in method com.google.firebase.firestore.pipeline.Expr.mapRemove [ParameterNameChange]
error: Added method com.google.firebase.firestore.pipeline.ExprWithAlias.getAlias() [AddedMethod]
error: Added method com.google.firebase.firestore.pipeline.ExprWithAlias.getExpr() [AddedMethod]
error: Removed class com.google.firebase.firestore.pipeline.GenericOptions [RemovedClass]
error: Removed method com.google.firebase.firestore.pipeline.PipelineOptions.withExplainOptions(com.google.firebase.firestore.pipeline.ExplainOptions) [RemovedMethod]
error: Added class com.google.firebase.firestore.pipeline.RawOptions [AddedClass]
error: Removed method com.google.firebase.firestore.pipeline.Stage.getName() [RemovedMethod]
error: Removed method com.google.firebase.firestore.pipeline.Stage.with(String,String) [RemovedMethod]
error: Removed method com.google.firebase.firestore.pipeline.Stage.with(String,boolean) [RemovedMethod]
error: Removed method com.google.firebase.firestore.pipeline.Stage.with(String,com.google.firebase.firestore.pipeline.Field) [RemovedMethod]
error: Removed method com.google.firebase.firestore.pipeline.Stage.with(String,double) [RemovedMethod]
error: Removed method com.google.firebase.firestore.pipeline.Stage.with(String,error.NonExistentClass) [RemovedMethod]
error: Removed method com.google.firebase.firestore.pipeline.Stage.with(String,long) [RemovedMethod]
error: Added method com.google.firebase.firestore.pipeline.Stage.withOption(String,String) [AddedMethod]
error: Added method com.google.firebase.firestore.pipeline.Stage.withOption(String,boolean) [AddedMethod]
error: Added method com.google.firebase.firestore.pipeline.Stage.withOption(String,com.google.firebase.firestore.pipeline.Field) [AddedMethod]
error: Added method com.google.firebase.firestore.pipeline.Stage.withOption(String,double) [AddedMethod]
error: Added method com.google.firebase.firestore.pipeline.Stage.withOption(String,error.NonExistentClass) [AddedMethod]
error: Added method com.google.firebase.firestore.pipeline.Stage.withOption(String,long) [AddedMethod]

Please update the api.txt files for the subprojects being affected by this change by running ./gradlew ${subproject}:generateApiTxtFile. Also perform a major/minor bump accordingly.

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

Successfully merging this pull request may close these issues.

4 participants