Skip to content
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

add BloomFilter class #6795

Merged
merged 34 commits into from Nov 30, 2022
Merged

Conversation

milaGGL
Copy link
Contributor

@milaGGL milaGGL commented Nov 14, 2022

Add BloomFilter class

  • add a constructor that takes a bitmap, padding and hashcount
  • validate constructor input against empty bloom filter and negative input values
  • add mightContain method to BloomFilter
  • add tests for bloom filter input validation
  • copy paste golden tests from backend
  • add tests to make sure mightContain result is in sync with backend(use golden tests)
  • import MD5, Integer from google closure library

@changeset-bot
Copy link

changeset-bot bot commented Nov 14, 2022

⚠️ No Changeset found

Latest commit: 1440908

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Nov 14, 2022

Changeset File Check ✅

  • No modified packages are missing from the changeset file.
  • No changeset formatting errors detected.

@milaGGL milaGGL changed the base branch from master to mila/BloomFilter November 14, 2022 21:54
@milaGGL milaGGL changed the base branch from mila/BloomFilter to master November 14, 2022 22:07
@milaGGL milaGGL changed the base branch from master to mila/BloomFilter November 14, 2022 22:07
@google-oss-bot
Copy link
Contributor

google-oss-bot commented Nov 14, 2022

Size Report 1

Affected Products

  • @firebase/webchannel-wrapper

    TypeBase (a2c1c24)Merge (7e32e27)Diff
    esm544.7 kB55.2 kB+10.5 kB (+23.6%)
    main54.6 kB65.1 kB+10.5 kB (+19.3%)
    module42.4 kB52.9 kB+10.5 kB (+24.8%)
  • bundle

    TypeBase (a2c1c24)Merge (7e32e27)Diff
    firestore (Persistence)281 kB291 kB+10.5 kB (+3.8%)
    firestore (Query Cursors)220 kB230 kB+10.5 kB (+4.8%)
    firestore (Query)217 kB228 kB+10.5 kB (+4.8%)
    firestore (Read data once)204 kB215 kB+10.5 kB (+5.2%)
    firestore (Realtime updates)207 kB217 kB+10.5 kB (+5.1%)
    firestore (Transaction)188 kB198 kB+10.5 kB (+5.6%)
    firestore (Write data)188 kB198 kB+10.5 kB (+5.6%)
  • firebase

    TypeBase (a2c1c24)Merge (7e32e27)Diff
    firebase-compat.js746 kB756 kB+10.4 kB (+1.4%)
    firebase-firestore-compat.js319 kB330 kB+10.4 kB (+3.2%)
    firebase-firestore.js321 kB331 kB+10.5 kB (+3.3%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/xskoCYbgK7.html

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Nov 14, 2022

Size Analysis Report 1

This report is too large (144,802 characters) to be displayed here in a GitHub comment. Please use the below link to see the full report on Google Cloud Storage.

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/XfT4rjgKFV.html

@milaGGL milaGGL changed the base branch from mila/BloomFilter to master November 18, 2022 23:06
@milaGGL milaGGL changed the base branch from master to mila/BloomFilter November 18, 2022 23:07
Copy link
Contributor

@dconeybe dconeybe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More feedback :) Thanks for addressing the comments from the last round of review.

packages/firestore/src/remote/bloom_filter.ts Outdated Show resolved Hide resolved
packages/firestore/src/remote/bloom_filter.ts Outdated Show resolved Hide resolved
packages/firestore/src/remote/bloom_filter.ts Outdated Show resolved Hide resolved
packages/firestore/src/remote/bloom_filter.ts Outdated Show resolved Hide resolved
packages/firestore/src/remote/bloom_filter.ts Outdated Show resolved Hide resolved
packages/firestore/src/remote/bloom_filter.ts Outdated Show resolved Hide resolved
packages/firestore/test/unit/remote/bloom_filter.test.ts Outdated Show resolved Hide resolved
packages/firestore/test/unit/remote/bloom_filter.test.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@dconeybe dconeybe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the updates! More feedback :)

packages/firestore/src/remote/bloom_filter.ts Outdated Show resolved Hide resolved
packages/firestore/src/remote/bloom_filter.ts Outdated Show resolved Hide resolved
packages/firestore/src/remote/bloom_filter.ts Outdated Show resolved Hide resolved
packages/firestore/src/remote/bloom_filter.ts Outdated Show resolved Hide resolved
packages/firestore/src/remote/bloom_filter.ts Outdated Show resolved Hide resolved
packages/firestore/test/unit/remote/bloom_filter.test.ts Outdated Show resolved Hide resolved
packages/firestore/test/unit/remote/bloom_filter.test.ts Outdated Show resolved Hide resolved
packages/firestore/test/unit/remote/bloom_filter.test.ts Outdated Show resolved Hide resolved
packages/firestore/src/remote/bloom_filter.ts Outdated Show resolved Hide resolved
packages/firestore/src/remote/bloom_filter.ts Outdated Show resolved Hide resolved
packages/firestore/src/remote/bloom_filter.ts Outdated Show resolved Hide resolved
packages/firestore/src/remote/bloom_filter.ts Outdated Show resolved Hide resolved
packages/firestore/src/remote/bloom_filter.ts Show resolved Hide resolved
packages/firestore/test/unit/remote/bloom_filter.test.ts Outdated Show resolved Hide resolved
packages/firestore/test/unit/remote/bloom_filter.test.ts Outdated Show resolved Hide resolved
packages/firestore/test/unit/remote/bloom_filter.test.ts Outdated Show resolved Hide resolved
packages/firestore/test/unit/remote/bloom_filter.test.ts Outdated Show resolved Hide resolved
@dconeybe
Copy link
Contributor

FYI #6833 has been merged into master, which should fix the issues with the "Test Firestore" and "Test All Packages" GitHub Actions. Please merge in the latest from master at your earliest convenience.

@milaGGL milaGGL changed the base branch from mila/BloomFilter to master November 29, 2022 22:20
@milaGGL milaGGL changed the base branch from master to mila/BloomFilter November 29, 2022 22:20
Copy link
Contributor

@dconeybe dconeybe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved! Thanks for working on this!

@milaGGL milaGGL merged commit c17af51 into mila/BloomFilter Nov 30, 2022
@milaGGL milaGGL deleted the mila/BloomFilter-add-BloomFilter-class branch November 30, 2022 18:01
@firebase firebase locked and limited conversation to collaborators Dec 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants