-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(firestore): pipeline subequeries #16470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
39abeea
initial commit
daniel-sanche 479d1cd
update docstring
daniel-sanche 351bd02
fixed formatting
daniel-sanche b865156
added assert proto blocks
daniel-sanche 6f37a5b
fixed bug in tests
daniel-sanche d94d967
Apply suggestion from @gemini-code-assist[bot]
daniel-sanche 5666fcb
added get_field
daniel-sanche a08409e
fixed error docstring; added test case
daniel-sanche 15a7789
updated docstrings
daniel-sanche 6c9b65d
added new SubPipeline class
daniel-sanche 604e10d
male SubPipeline public
daniel-sanche 1f9e70c
fixed lint
daniel-sanche 9e4cb07
added e2e test for failed union
daniel-sanche b1f87ef
updating docstrings
daniel-sanche 5a700af
Merge branch 'main' into firestore_pipelines_join
daniel-sanche 6f9d8dd
reordered file
daniel-sanche cc296ac
added test case
daniel-sanche d49efd4
updating test yaml
daniel-sanche 4d58a44
made subcollection into staticmethod
daniel-sanche 6f61f78
added subcollections to test yaml
daniel-sanche 0e5f917
fixed lint
daniel-sanche e320e5c
Merge branch 'main' into firestore_pipelines_join
daniel-sanche File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
packages/google-cloud-firestore/tests/system/pipeline_e2e/subqueries.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| tests: | ||
| - description: array_subquery_with_variable | ||
| pipeline: | ||
| - Collection: publishers | ||
| - Where: | ||
| - Field.of.equal: | ||
| - publisherId | ||
| - pub1 | ||
| - Define: | ||
| - Field.of.as_: | ||
| - publisherId | ||
| - pub_id | ||
| - AddFields: | ||
| - Pipeline.to_array_expression: | ||
| - Collection: books | ||
| - Where: | ||
| - Field.of.equal: | ||
| - publisherId | ||
| - Variable: pub_id | ||
| as_: books | ||
| - Select: | ||
| - Field: name | ||
| - Field: books | ||
| assert_results: | ||
| - name: Publisher 1 | ||
| books: | ||
| - title: The Hitchhiker's Guide to the Galaxy | ||
| author: Douglas Adams | ||
| - title: Pride and Prejudice | ||
| author: Jane Austen | ||
|
|
||
| - description: scalar_subquery_with_current_document | ||
| pipeline: | ||
| - Collection: books | ||
| - Where: | ||
| - Field.of.equal: | ||
| - title | ||
| - 1984 | ||
| - Define: | ||
| - CurrentDocument.as_: doc | ||
| - AddFields: | ||
| - Pipeline.to_scalar_expression: | ||
| - Collection: reviews | ||
| - Where: | ||
| - Field.of.equal: | ||
| - bookId | ||
| - Variable.get_field: | ||
| - doc | ||
| - __name__ | ||
| - Aggregate: | ||
| - AggregateFunction.average.as_: | ||
| - rating | ||
| - avg_rating | ||
| as_: average_rating | ||
| assert_results: | ||
| - title: 1984 | ||
| average_rating: 4.5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.