Skip to content

Fix IN filters #3002

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 4 commits into from
Sep 29, 2021
Merged

Fix IN filters #3002

merged 4 commits into from
Sep 29, 2021

Conversation

schmidt-sebastian
Copy link
Contributor

The current implementation for IN filters has a bug.

For where('foo', 'in', [1,3]) we currently run:

foo >= 1 && foo <= 1 OR foo >= 1 && foo <= 3 OR foo >= 3 && foo <= 1 OR foo >= 3 && foo <= 3

This also returns "2".

We should only run:

foo >= 1 && foo <= 1 OR foo >= 3 && foo <= 3

@schmidt-sebastian
Copy link
Contributor Author

cc @thebrianchen

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Sep 24, 2021

Coverage Report

Affected SDKs

  • firebase-firestore

    SDK overall coverage changed from 43.45% (e8ac306) to 43.44% (cfc2e721) by -0.01%.

    Filename Base (e8ac306) Head (cfc2e721) Diff
    AsyncQueue.java 78.00% 77.00% -1.00%
    SQLiteIndexManager.java 96.06% 96.04% -0.02%

Test Logs

Notes

HTML coverage reports can be produced locally with ./gradlew <product>:checkCoverage.
Report files are located at <product-build-dir>/reports/jacoco/.

Head commit (cfc2e721) is created by Prow via merging commits: e8ac306 abcb01e.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Sep 24, 2021

Binary Size Report

Affected SDKs

  • firebase-firestore

    Type Base (e8ac306) Head (cfc2e721) Diff
    aar 1.20 MB 1.20 MB -74 B (-0.0%)
    apk (release) 3.24 MB 3.24 MB -72 B (-0.0%)

Test Logs

Notes

Head commit (cfc2e721) is created by Prow via merging commits: e8ac306 abcb01e.

@wu-hui wu-hui assigned schmidt-sebastian and unassigned wu-hui Sep 27, 2021
Base automatically changed from mrschmidt/limit to master September 29, 2021 17:16
@schmidt-sebastian schmidt-sebastian merged commit 6ac9d7f into master Sep 29, 2021
@schmidt-sebastian schmidt-sebastian deleted the mrschmidt/in branch September 29, 2021 18:22
@firebase firebase locked and limited conversation to collaborators Oct 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants