-
Notifications
You must be signed in to change notification settings - Fork 75
feat: ppl pri-pre #2272
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
base: main
Are you sure you want to change the base?
feat: ppl pri-pre #2272
Conversation
setup nix for idx
…uandy/PipelineResult
pipeline result
* Implement new stages. * Replace toList() with older languages feature. * Pretty * Pretty * Comment out under development API surface * Pretty
* Refactor pipelines * Pretty * Simplify
* Refactor * Cleanup
* Incomplete prototyping of pipeline options * Incomplete prototyping of pipeline options * Incomplete prototyping of pipeline options * Incomplete prototyping of pipeline options * Changes from feedback * Expand example and fix. * Comments --------- Co-authored-by: wu-hui <53845758+wu-hui@users.noreply.github.com>
* add Java snippets * Add input and expression snippets * add query explain snippet
|
Warning: This pull request is touching the following templated files:
|
3aece03 to
bd317e2
Compare
f5e464b to
651bd3d
Compare
651bd3d to
6ae12ec
Compare
MarkDuckworth
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR title will be in the change log, so be sure to update this
MarkDuckworth
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initial review. It looks like there are a few API changes that need to be ported from Android
| * documents, execution time, and explain stats. | ||
| */ | ||
| @BetaApi | ||
| public static final class Snapshot { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question on this SDK about Pipeline.Snapshot vs PipelineSnapshot
| * @return A new Pipeline object with this stage appended to the stage list. | ||
| */ | ||
| @BetaApi | ||
| public Pipeline addFields(Selectable... fields) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not have the same signature as Android: fun addFields(field: Selectable, vararg additionalFields: Selectable) ...
It looks like this is true throughout the API for adding stages
| // @BetaApi | ||
| // public Pipeline unnest(Selectable field) { | ||
| // return append(new Unnest(field)); | ||
| // } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this API be added for feature parity?
| // @BetaApi | ||
| // public Pipeline unnest(Selectable field, UnnestOptions options) { | ||
| // return append(new Unnest(field, options)); | ||
| // } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same, should this be uncommented
| @@ -0,0 +1,456 @@ | |||
| /* | |||
| * Copyright 2017 Google LLC | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update date
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eventually we also want to javadoc the apis in this file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eventual javadoc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eventual javadoc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to port BooleanExpression changes from Android. same probably for nodejs-firestore
| * @return A new {@link Expression} representing the generic function. | ||
| */ | ||
| @BetaApi | ||
| public static Expression generic(String name, Expression... expr) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename to rawExpression
| } | ||
|
|
||
| public AggregateHints withForceStreamableEnabled() { | ||
| return with("force_streamable", true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not familiar with this hint, are we sure this is current?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
force_streamable is not listed
| } | ||
|
|
||
| public CollectionHints withIgnoreIndexFields(String... values) { | ||
| return with("ignore_index_fields", values); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also no longer listed, that i'm aware of
MarkDuckworth
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another round of comments on the remaining files. I think we need to determine what to do with the differences in the API before release
| <groupId>com.google.cloud</groupId> | ||
| <artifactId>google-cloud-firestore-bom</artifactId> | ||
| <!-- Tell the application to use the private preview BOM of cloud SDK --> | ||
| <version>99.99.0-PRIVATEPREVIEW</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this version need to be updated for the release?
| this.firestore = firestore; | ||
| } | ||
|
|
||
| void queryExplain() throws ExecutionException, InterruptedException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This snippet does not appear related to pipelines
| method @NonNull public static com.google.cloud.firestore.AggregateField.AverageAggregateField average(@NonNull com.google.cloud.firestore.FieldPath); | ||
| method @NonNull public static com.google.cloud.firestore.AggregateField.AverageAggregateField average(@NonNull String); | ||
| method @NonNull public static com.google.cloud.firestore.AggregateField.CountAggregateField count(); | ||
| method public static com.google.cloud.firestore.AggregateField.AverageAggregateField average(com.google.cloud.firestore.FieldPath); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a little concerned about @nonnull attribute being dropped throughout the API. I can't determine if this is only dropped in this api.txt, or if there was some config / source change. If it was actually dropped from the API surface, that would be a breaking change.
| * @return An {@link Expression} constant instance. | ||
| */ | ||
| @BetaApi | ||
| public static Expression vector(VectorValue value) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty sure we dropped this way to create a constant from a vector, because it is also listed above Expression constant(VectorValue vector)
| * @return An {@link Expression} constant instance. | ||
| */ | ||
| @BetaApi | ||
| public static Expression vector(double[] value) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we dropped both overloads of vector(x) to create a constant
No description provided.