-
Notifications
You must be signed in to change notification settings - Fork 1.4k
feat: Add KHyperLogLog Result Verifier #15651
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
Open
natashasehgal
wants to merge
7
commits into
facebookincubator:main
Choose a base branch
from
natashasehgal:export-D87953011
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat: Add KHyperLogLog Result Verifier #15651
natashasehgal
wants to merge
7
commits into
facebookincubator:main
from
natashasehgal:export-D87953011
+4,251
−182
Conversation
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
Summary: Pull Request resolved: facebookincubator#15573 Moving HllAccumulator which was part of HyperloglogAggregates to HllUtils, so that it can be reused in Khyperloglog. HllAccumulator provides the functionality to switch between Sparse and Dense HLLs, along with other functions like merge, insertHash, cardinality which also take care of the 2 versions of HLL (sparse and dense), which is also needed for the implementation of KHLL. Differential Revision: D87486444
) Summary: Pull Request resolved: facebookincubator#15594 Adding some functionalities to HllAccumulator to accomodate KHLL - mergeWith which takes in a deserialized HllAccumuator - template typename TAllocator, to allow usage of both HashStringAllocator and MemoryPool, with the default set to use HashStringAllocator (as Sparse and Dense Hll does) Differential Revision: D87591323
Summary: Pull Request resolved: facebookincubator#15429 Adding khll util functions as per the Java implementation. (https://github.com/prestodb/presto/tree/master/presto-main-base/src/main/java/com/facebook/presto/type/khyperloglog) These will be used by KHLL udfs from https://prestodb.io/docs/current/functions/khyperloglog.html Differential Revision: D86235906
Summary: Pull Request resolved: facebookincubator#15550 Adds the scalar udfs of the khyperloglog type, based on the utils from facebookincubator#15429 Java implementation: https://github.com/prestodb/presto/blob/master/presto-main-base/src/main/java/com/facebook/presto/type/khyperloglog/KHyperLogLogFunctions.java Presto docs: https://prestodb.io/docs/current/functions/khyperloglog.html Differential Revision: D87008234
✅ Deploy Preview for meta-velox canceled.
|
Summary: This adds a KHyperLogLogInputGenerator for fuzzing KHyperLogLog functions. The generator creates valid serialized KHyperLogLog structures by: 1. Randomly selecting a base type (BIGINT, VARCHAR, DOUBLE, or UNKNOWN) 2. Generating random join keys and UII pairs based on the base type 3. Adding them to a KHyperLogLog instance with random maxSize and hllBuckets 4. Serializing the result as VARBINARY The generator supports configurable null ratio and minimum number of values, making it suitable for comprehensive fuzzing of KHyperLogLog-related functions. This enables better test coverage for the KHyperLogLog scalar UDFs added in the stack. Differential Revision: D87950763
Differential Revision: D87100364
|
@natashasehgal has exported this pull request. If you are a Meta employee, you can view the originating Diff in D87953011. |
91647e5 to
6f63d05
Compare
natashasehgal
added a commit
to natashasehgal/velox
that referenced
this pull request
Nov 27, 2025
Summary: Pull Request resolved: facebookincubator#15651 Add KHLL result verifier for HLL aggregate functions Deserializes KHLL sketches and compares cardinality estimates Allow 5% relative error tolerance Differential Revision: D87953011
Summary: Pull Request resolved: facebookincubator#15651 Add KHLL result verifier for HLL aggregate functions Deserializes KHLL sketches and compares cardinality estimates Allow 5% relative error tolerance Differential Revision: D87953011
6f63d05 to
e82ebe3
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
fb-exported
meta-exported
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.
Differential Revision: D87953011