Conversation
…/pipeline/DisjunctiveTests.kt Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Using Gemini Code AssistThe 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
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 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. |
📝 PRs merging into main branchOur 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. |
|
/gemini review |
There was a problem hiding this comment.
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.
firebase-firestore/src/main/java/com/google/firebase/firestore/pipeline/expressions.kt
Show resolved
Hide resolved
firebase-firestore/src/main/java/com/google/firebase/firestore/pipeline/expressions.kt
Show resolved
Hide resolved
firebase-firestore/src/main/java/com/google/firebase/firestore/pipeline/expressions.kt
Outdated
Show resolved
Hide resolved
|
/gemini review |
There was a problem hiding this comment.
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.
firebase-firestore/src/main/java/com/google/firebase/firestore/pipeline/expressions.kt
Show resolved
Hide resolved
firebase-firestore/src/main/java/com/google/firebase/firestore/pipeline/expressions.kt
Show resolved
Hide resolved
|
/gemini review |
There was a problem hiding this comment.
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.
ported from firebase/firebase-js-sdk#9788