GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Firestore: Add support for IN Queries by schmidt-sebastian · Pull Request #5803 · googleapis/google-cloud-java

Conversation

@schmidt-sebastian

@schmidt-sebastian schmidt-sebastian commented Jul 23, 2019 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

This adds support for Firestore's new IN and ARRAY_CONTAINS_ANY queries.

This can not yet be merged:

  • The underlying Proto change is not public yet (hence the PR won't compile)
  • The backend does not yet support these types of queries (the test won't pass)

This PR is meant to be a reference for other languages.

Port of googleapis/nodejs-firestore#715

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@schmidt-sebastian
Firestore: Add support for IN Queries (blocked)
2c1e647
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jul 23, 2019
@schmidt-sebastian schmidt-sebastian added the status: blocked Resolving the issue is dependent on other work. label Jul 23, 2019
@schmidt-sebastian

schmidt-sebastian commented Jul 23, 2019

Copy link
Copy Markdown
Contributor Author

cc @thebrianchen

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

thebrianchen
thebrianchen approved these changes Jul 24, 2019
View reviewed changes

@thebrianchen thebrianchen left a comment

Copy link
Copy Markdown

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.

Just double checking, do we need any serialization/deserialization tests for the java sdk?
otherwise, LGTM

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@schmidt-sebastian

schmidt-sebastian commented Jul 28, 2019

Copy link
Copy Markdown
Contributor Author

Just double checking, do we need any serialization/deserialization tests for the java sdk?
otherwise, LGTM

We create the Proto directly via the somewhat hidden whereHelper. The unit tests then confirm that we created the expected request.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@schmidt-sebastian
Merge branch 'master' into mrschmidt/inqueries
e59b9a2
@BenWhitehead

BenWhitehead commented Oct 24, 2019

Copy link
Copy Markdown
Contributor

@schmidt-sebastian Can we rebase this and get it fixed up to merge now that the protos are available as of #6479?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@schmidt-sebastian

schmidt-sebastian commented Oct 25, 2019

Copy link
Copy Markdown
Contributor Author

We can probably launch this as soon as next week. I will rebase the PR on Monday.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@schmidt-sebastian
Code foramt
087e93f
@codecov

codecov Bot commented Oct 28, 2019 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

Merging #5803 into master will increase coverage by 0.28%.
The diff coverage is 66.66%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #5803      +/-   ##
============================================
+ Coverage     46.06%   46.35%   +0.28%     
- Complexity    28002    28021      +19     
============================================
  Files          2613     2613              
  Lines        287940   288087     +147     
  Branches      32912    33778     +866     
============================================
+ Hits         132641   133531     +890     
- Misses       144230   144312      +82     
+ Partials      11069    10244     -825
Impacted Files Coverage Δ Complexity Δ
...rc/main/java/com/google/cloud/firestore/Query.java 91.89% <66.66%> (-0.7%) 101 <4> (+11)
.../cloud/datastore/testing/LocalDatastoreHelper.java 80.59% <0%> (-4.48%) 17% <0%> (ø)
...le/cloud/compute/deprecated/DeprecationStatus.java 88.63% <0%> (-3.13%) 20% <0%> (ø)
...able/gaxx/reframing/ReframingResponseObserver.java 88.99% <0%> (-1.84%) 29% <0%> (-1%)
...le/cloud/storage/contrib/nio/CloudStoragePath.java 75.67% <0%> (-0.69%) 51% <0%> (ø)
...ge/contrib/nio/CloudStorageFileSystemProvider.java 62.76% <0%> (-0.3%) 73% <0%> (ø)
...ain/java/com/google/cloud/logging/LoggingImpl.java 87.9% <0%> (-0.19%) 73% <0%> (ø)
...ain/java/com/google/cloud/storage/StorageImpl.java 76.72% <0%> (-0.16%) 114% <0%> (+6%)
...m/google/cloud/spanner/jdbc/JdbcTypeConverter.java 74.86% <0%> (-0.14%) 88% <0%> (ø)
...oogle/cloud/spanner/jdbc/JdbcDatabaseMetaData.java 87.67% <0%> (-0.13%) 165% <0%> (ø)
... and 179 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3157b23...0a631c7. Read the comment docs.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@BenWhitehead

BenWhitehead commented Oct 28, 2019

Copy link
Copy Markdown
Contributor

@schmidt-sebastian The two new integration tests are failing with assertion errors. Does the integration test project need to be given explicit access for these to pass?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@schmidt-sebastian

schmidt-sebastian commented Oct 28, 2019

Copy link
Copy Markdown
Contributor Author

@schmidt-sebastian The two new integration tests are failing with assertion errors. Does the integration test project need to be given explicit access for these to pass?

No, they just have never been run and are buggy. I am updating them right now, and will also fix one incompatibility with Java 7 that we just noticed on Android.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

schmidt-sebastian added 2 commits October 28, 2019 11:38
@schmidt-sebastian
Integration test fixes
2fe3195
@schmidt-sebastian
Add Java7 overloads
3853e40
@schmidt-sebastian

schmidt-sebastian commented Oct 28, 2019

Copy link
Copy Markdown
Contributor Author

I updated the PR, it should now be in a good state. At first, we wanted to add a varargs method, but we noticed that it break when a user calls Query.whereIn(field, null) since Java 7 picks the wrong overload (@NunNull List<> is preferred). We decided to punt on this for now and may add the overloads later if requested.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@schmidt-sebastian
schmidt-sebastian force-pushed the mrschmidt/inqueries branch from 396ff8c to 080e7e2 Compare October 28, 2019 20:56
@schmidt-sebastian
Remove overloads since they clash with 'null' argument
5ea5dbd
@schmidt-sebastian
schmidt-sebastian force-pushed the mrschmidt/inqueries branch from 080e7e2 to 5ea5dbd Compare October 28, 2019 20:57
BenWhitehead
BenWhitehead suggested changes Oct 29, 2019
View reviewed changes

@BenWhitehead BenWhitehead left a comment

Copy link
Copy Markdown
Contributor

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.

Looks like there is a compiler error due to in incorrect variable name

[ERROR] /tmp/src/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Query.java:[632,85] cannot find symbol
[ERROR]   symbol:   variable value
[ERROR]   location: class com.google.cloud.firestore.Query

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Query.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

schmidt-sebastian and others added 3 commits October 29, 2019 12:59
@schmidt-sebastian @BenWhitehead
Update google-cloud-clients/google-cloud-firestore/src/main/java/com/…
06e24a2
…google/cloud/firestore/Query.java

Co-Authored-By: BenWhitehead <[email protected]>
@schmidt-sebastian
Fix compile
853150c
@schmidt-sebastian
Code format
0a631c7
@schmidt-sebastian schmidt-sebastian removed the status: blocked Resolving the issue is dependent on other work. label Oct 29, 2019
@schmidt-sebastian schmidt-sebastian changed the title Firestore: Add support for IN Queries (blocked) Firestore: Add support for IN Queries Oct 29, 2019
@schmidt-sebastian schmidt-sebastian assigned BenWhitehead Oct 29, 2019
BenWhitehead
BenWhitehead approved these changes Oct 30, 2019
View reviewed changes
@BenWhitehead
BenWhitehead merged commit bead76a into master Oct 30, 2019
@BenWhitehead
BenWhitehead deleted the mrschmidt/inqueries branch October 30, 2019 15:36
@chingor13 chingor13 mentioned this pull request Oct 30, 2019
Release google-cloud-java v0.117.0 #6664
Merged
@codyoss codyoss mentioned this pull request Nov 6, 2019
Release google-cloud-java v0.112.0 #6703
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

2 more reviewers
@BenWhitehead BenWhitehead BenWhitehead approved these changes
@thebrianchen thebrianchen thebrianchen approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@BenWhitehead BenWhitehead

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@schmidt-sebastian @BenWhitehead @thebrianchen @googlebot
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.