Skip to content

feat(firestore): Add array expressions#15900

Open
milaGGL wants to merge 6 commits intomainfrom
mila/expressions-array
Open

feat(firestore): Add array expressions#15900
milaGGL wants to merge 6 commits intomainfrom
mila/expressions-array

Conversation

@milaGGL
Copy link
Contributor

@milaGGL milaGGL commented Mar 3, 2026

Add new array expressions arrayFirst, arrayFirstN, arrayLast, arrayLastN, arrayMinimumN,arrayMaximumN, arrayIndexOf, arrayLastIndexOf, arrayIndexOfAll.

ported from firebase/firebase-js-sdk#9492

@gemini-code-assist
Copy link
Contributor

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

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.

@dlarocque
Copy link
Contributor

/gemini review

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 comprehensive set of new array expressions to the Firestore Pipeline API, including arrayFirst, arrayFirstN, arrayLast, arrayLastN, arrayMinimumN, arrayMaximumN, arrayIndexOf, arrayLastIndexOf, and arrayIndexOfAll. The changes are well-implemented across the API, implementation, and documentation files. The accompanying integration tests are thorough, covering both basic usage and various edge cases, which ensures the reliability of these new features.

The code quality is high, and the new additions are consistent with the existing API design. I have only a couple of minor suggestions to improve code style in the tests by using let instead of var for variables that are not reassigned.

Overall, this is an excellent contribution that significantly enhances the array manipulation capabilities of Firestore pipelines.

milaGGL and others added 3 commits March 5, 2026 10:20
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@milaGGL milaGGL requested a review from dlarocque March 5, 2026 17:44
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.

2 participants