Skip to content

feat(firestore): add array expressions#7989

Open
milaGGL wants to merge 72 commits intomainfrom
mila/arraySlice-arrayFilter
Open

feat(firestore): add array expressions#7989
milaGGL wants to merge 72 commits intomainfrom
mila/arraySlice-arrayFilter

Conversation

@milaGGL
Copy link
Copy Markdown
Contributor

@milaGGL milaGGL commented Mar 28, 2026

@gemini-code-assist
Copy link
Copy Markdown
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.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 30, 2026

📝 PRs merging into main branch

Our main branch should always be in a releasable state. If you are working on a larger change, or if you don't want this change to see the light of the day just yet, consider using a feature branch first, and only merge into the main branch when the code complete and ready to be released.

@dlarocque
Copy link
Copy Markdown
Contributor

/gemini review

Copy link
Copy Markdown
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 several new array-based Pipeline expressions to Firestore, specifically arrayFilter, arraySlice, arrayTransform, and arrayTransformWithIndex. The implementation includes both static and instance methods in the Kotlin Expression class, along with corresponding API surface updates and comprehensive integration tests covering edge cases like null values and negative offsets. Review feedback identifies minor documentation inconsistencies where the return descriptions for the arrayTransformWithIndex methods incorrectly refer to arrayTransform.

dlarocque
dlarocque previously approved these changes Mar 31, 2026
@milaGGL
Copy link
Copy Markdown
Contributor Author

milaGGL commented Mar 31, 2026

/gemini review

Copy link
Copy Markdown
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 several new Pipeline expressions for array manipulation in Firestore, including arraySlice, arraySliceToEnd, arrayFilter, arrayTransform, and arrayTransformWithIndex. The changes encompass updates to the public API, implementation within the Kotlin expressions file, and the addition of integration tests. Feedback was provided to ensure that the internal function names used in the constructors for arrayTransformWithIndex are distinct from those used for arrayTransform to avoid potential conflicts or confusion.

@milaGGL
Copy link
Copy Markdown
Contributor Author

milaGGL commented Apr 2, 2026

/gemini review

@milaGGL milaGGL closed this Apr 2, 2026
@milaGGL milaGGL reopened this Apr 2, 2026
Copy link
Copy Markdown
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 several new Pipeline expressions for array manipulation in Firestore, including arrayFilter, arrayTransform, arrayTransformWithIndex, arraySlice, and arraySliceToEnd. These additions include both static and instance methods in the Expression class, along with corresponding integration tests and public API updates. The review feedback suggests several improvements: implementing client-side validation for the length parameter in arraySlice to provide immediate feedback for negative values, renaming parameters for better consistency across the API, adding overloads to support mixed Int and Expression arguments in slicing operations, and expanding test coverage to verify Expression-based parameters.

Copy link
Copy Markdown
Contributor

@yvonnep165 yvonnep165 left a comment

Choose a reason for hiding this comment

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

LGTM!

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