Skip to content

feat(firestore): add support for remaining map pipeline expressions#9483

Open
dlarocque wants to merge 2 commits intomainfrom
dl/map-expressions
Open

feat(firestore): add support for remaining map pipeline expressions#9483
dlarocque wants to merge 2 commits intomainfrom
dl/map-expressions

Conversation

@dlarocque
Copy link
Contributor

@dlarocque dlarocque commented Feb 4, 2026

Adds support for the remaining map Pipeline expressions; mapKeys, mapValues, mapEntries, mapSet.

@changeset-bot
Copy link

changeset-bot bot commented Feb 4, 2026

🦋 Changeset detected

Latest commit: f463522

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
firebase Minor
@firebase/firestore Minor
@firebase/firestore-compat Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @dlarocque, 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 significantly enhances Firestore's data transformation capabilities by integrating a suite of new map-related pipeline expressions. These additions allow developers to perform more complex and efficient map manipulations directly within their Firestore queries, such as setting new key-value pairs, extracting keys, retrieving values, and converting maps into arrays of entries. This expansion aims to provide greater flexibility and power for data processing workflows.

Highlights

  • New Map Pipeline Expressions: Introduced four new pipeline expressions for map manipulation: mapSet, mapValues, mapEntries, and mapKeys.
  • API Surface Expansion: The public API for both the full Firestore SDK and Firestore Lite pipelines has been updated to include these new map expressions, making them available for use in data transformation.
  • Comprehensive Documentation: Detailed documentation, including signatures, parameters, return types, and usage examples, has been added for all new map expressions across the devsite documentation for both Firestore and Firestore Lite.
  • Robust Testing: New integration and lite API tests have been added to ensure the correct functionality and reliability of the mapSet, mapValues, mapEntries, and mapKeys expressions.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • .changeset/afraid-pigs-heal.md
    • Added a new changeset file documenting the addition of mapSet, mapValues, mapEntries, and mapKeys pipeline expressions.
  • common/api-review/firestore-lite-pipelines.api.md
    • Added mapEntries(), mapKeys(), mapSet(), and mapValues() methods to the Expression class.
    • Added mapEntries(), mapKeys(), mapSet(), and mapValues() as standalone functions.
  • common/api-review/firestore-pipelines.api.md
    • Added mapEntries(), mapKeys(), mapSet(), and mapValues() methods to the Expression class.
    • Added mapEntries(), mapKeys(), mapSet(), and mapValues() as standalone functions.
  • docs-devsite/firestore_lite_pipelines.expression.md
    • Added detailed documentation for Expression.mapEntries(), Expression.mapKeys(), Expression.mapSet(), and Expression.mapValues(), including examples.
  • docs-devsite/firestore_lite_pipelines.md
    • Added detailed documentation for the standalone mapEntries(), mapKeys(), mapSet(), and mapValues() functions, including examples.
  • docs-devsite/firestore_pipelines.expression.md
    • Added detailed documentation for Expression.mapEntries(), Expression.mapKeys(), Expression.mapSet(), and Expression.mapValues() for the full Firestore SDK, including examples.
  • docs-devsite/firestore_pipelines.md
    • Added detailed documentation for the standalone mapEntries(), mapKeys(), mapSet(), and mapValues() functions for the full Firestore SDK, including examples.
  • packages/firestore/lite/pipelines/pipelines.ts
    • Exported the new mapSet, mapKeys, mapValues, and mapEntries functions.
  • packages/firestore/src/api_pipelines.ts
    • Exported the new mapSet, mapKeys, mapValues, and mapEntries functions.
  • packages/firestore/src/lite-api/expressions.ts
    • Implemented mapSet, mapKeys, mapValues, and mapEntries methods on the Expression class.
    • Implemented the standalone mapSet, mapKeys, mapValues, and mapEntries functions.
  • packages/firestore/test/integration/api/pipeline.test.ts
    • Added integration tests for mapSet, mapKeys, mapValues, and mapEntries.
  • packages/firestore/test/lite/pipeline.test.ts
    • Added lite API tests for mapSet, mapKeys, mapValues, and mapEntries.
Activity
  • No human activity (comments, reviews) has been recorded on this pull request yet.
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 by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

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 pull request 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.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

Changeset File Check ✅

  • No modified packages are missing from the changeset file.
  • No changeset formatting errors detected.

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 adds support for the mapSet, mapValues, mapEntries, and mapKeys pipeline expressions. The changes include the core implementation, API definitions, documentation, and tests. The implementation looks solid and the tests cover the new functionality well. I've only found some minor formatting issues in the documentation files, which I've commented on.

@dlarocque dlarocque marked this pull request as ready for review February 5, 2026 16:50
@dlarocque dlarocque requested review from a team as code owners February 5, 2026 16:50
@dlarocque dlarocque requested a review from milaGGL February 5, 2026 16:50
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.

2 participants