Core: Add a read-only Mumbling bitmap implementation#16747
Open
rdblue wants to merge 5 commits into
Open
Conversation
rdblue
commented
Jun 9, 2026
| httpcomponents-httpclient5 = { module = "org.apache.httpcomponents.client5:httpclient5", version.ref = "httpcomponents-httpclient5" } | ||
| immutables-value = { module = "org.immutables:value", version.ref = "immutables-value" } | ||
| jackson-bom = { module = "com.fasterxml.jackson:jackson-bom", version.ref = "jackson-bom" } | ||
| javafastpfor = { module = "me.lemire.integercompression:JavaFastPFOR", version.ref = "javafastpfor" } |
Contributor
Author
There was a problem hiding this comment.
This is for the benchmark and doesn't need to be included in the committed version.
rdblue
commented
Jun 9, 2026
| this.cardinality = | ||
| (data.get(data.position() + 1) & 0xFF) | ||
| | ((data.get(data.position() + 2) & 0xFF) << 8) | ||
| | ((data.get(data.position() + 3) & 0xFF) << 16); |
Contributor
Author
There was a problem hiding this comment.
This and other direct reads will be refactored to use utils in ByteBuffers after #16748 moves them out of VariantUtil.
pvary
reviewed
Jun 10, 2026
| Random random = new Random(1938745); | ||
|
|
||
| // 256-value descriptor-like data: mostly [0,31] with ~5% [0,255] outliers | ||
| descriptorValues = PFORRandomData.exceptions(random, 256, 0.5f); |
Contributor
|
What pattern should I test? |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is a simple implementation of Mumbling bitmap that has been proposed for embedded bitmaps in v4 metadata.
This implementation includes 3 main classes:
BitPacking: bit packing and unpacking implementations for specific widths (1-7) used for descriptor encodingPFOREncoding: patched frame-of-reference encoding and decoding for descriptor bytesSupport for creating and modifying bitmaps will be added in later PRs, similar to the approach for variant where
SerializedValueimplementations were added first as a building block for mutable implementations.This also includes a benchmark to compare the PFOR implementation to JavaFastPFOR. This is not a fair comparison because JavaFastPFOR is intended for large arrays and vectorization, but the use cases tested are very small arrays that don't benefit from vectorization and have high overhead. The reason for the benchmark is to show that it doesn't make sense to delegate to JavaFastPFOR for a small descriptor array. This benchmark probably won't be committed as it is now in the final version, but I wanted to make it available for reviewers.
Co-Authored-By: Claude Code (Opus 4.7, 1M context) noreply@anthropic.com