feat(firestore): [PQ] general, key, type, logical and object functions#13283
Conversation
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a comprehensive set of new pipeline functions for Firestore, including general, key, logical, and object manipulation functions. The changes are well-structured, with corresponding updates to interfaces, implementations, and extensive integration tests. The code quality is high, but I've identified a couple of areas for improvement: one related to a potentially leftover testing change in the integration test setup, and another concerning code duplication that could be refactored for better maintainability. Overall, this is a solid contribution that significantly enhances the pipeline query capabilities.
75ef6c1 to
a2fb94c
Compare
48bb423 to
5c23efa
Compare
5c23efa to
b865ed6
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces several new pipeline functions for Firestore, including general, key, logical, and object functions, along with corresponding integration tests. The changes are a good addition to the feature set. My review focuses on improving performance, ensuring deterministic behavior, adhering to Go conventions, and fixing some minor issues in the tests. I've identified a couple of high-severity issues related to performance and potential bugs that should be addressed. Other comments are of medium severity and aim to improve code quality and maintainability.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a significant number of new pipeline functions for Firestore, including general, key, logical, and object functions, along with their corresponding integration tests. The changes are extensive and well-tested. My review focuses on improving code efficiency, fixing a critical compilation error, and addressing a bug in the test suite. Overall, this is a great addition, and with a few adjustments, it will be even better.
| func typeFuncs(t *testing.T) { | ||
| t.Parallel() | ||
| h := testHelper{t} | ||
| client := integrationClient(t) |
There was a problem hiding this comment.
consider adding defer client.Close line in tests
There was a problem hiding this comment.
All the tests use the same client
google-cloud-go/firestore/integration_test.go
Lines 396 to 407 in 3584537
The client is closed here after all the tests run:
google-cloud-go/firestore/integration_test.go
Line 388 in 3584537
b80712a
into
googleapis:feature/fs-pipeline-queries
Add ExecuteOptions similar to query run options which was introduced in #10164. GetRawData and GetText implementation similar to Java https://github.com/googleapis/java-firestore/blob/742fab6583c9a6f9c47cf0496124c3c9b05fe0ee/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/PipelineExecuteOptions.java https://github.com/googleapis/java-firestore/blob/742fab6583c9a6f9c47cf0496124c3c9b05fe0ee/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/ExplainOptions.java https://github.com/googleapis/java-firestore/blob/742fab6583c9a6f9c47cf0496124c3c9b05fe0ee/google-cloud-firestore/src/main/java/com/google/cloud/firestore/ExplainStats.java#L42-L71 https://github.com/googleapis/java-firestore/blob/742fab6583c9a6f9c47cf0496124c3c9b05fe0ee/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITPipelineTest.java#L2474-L2498 Previous pull requests - #12217 - #12425 - #12538 - #13147 - #13199 - #13218 - #13194 - #13245 - #13270 - #13271 - #13279 - #13280 - #13281 - #13282 - googleapis/gapic-generator-go#1661 - #13283
Add CreateFrom() and Pipeline() similar to Java. https://github.com/googleapis/java-firestore/blob/742fab6583c9a6f9c47cf0496124c3c9b05fe0ee/google-cloud-firestore/src/main/java/com/google/cloud/firestore/PipelineSource.java#L140-L164 Previous pull requests - #12217 - #12425 - #12538 - #13147 - #13199 - #13218 - #13194 - #13245 - #13270 - #13271 - #13279 - #13280 - #13281 - #13282 - googleapis/gapic-generator-go#1661 - #13283 - #13274 - #13338
Changes in this PR:
See "Firestore Features (Pipeline)" sheet in go/firestore-query-tracker for the list of functions.
Java reference:
Previous pull requests