Repository navigation
Conversation
…r function Implement a probabilistic Bloom filter as an aggregate function groupBloomFilter that builds a filter from column values, and a scalar function bloomFilterContains that checks membership in the filter. Features: - Support for all numeric types (UInt8-UInt256, Int8-Int256, Float32/64) - Support for Date, Date32, DateTime, DateTime64, UUID, IPv4, IPv6, Enum8, Enum16 - Support for String and FixedString types - Configurable parameters: expected_elements, false_positive_rate, seed - Alternative parameter form: filter_size_bytes, num_hashes, seed - Default parameters when none specified - State storage in AggregatingMergeTree via -State combinator - Merge support with compatibility checks - Documentation for both functions Tests split into separate files: - Basic functionality and data types - Parameters and validation - Merge and boundary conditions - AggregatingMergeTree storage - Use cases with const/non-const arguments
`aspell-dict.txt` was deleted in master along with the `aspell` and `codespell` style checks. Removing the file here so the PR can merge cleanly without a modify/delete conflict.
# Conflicts: # src/AggregateFunctions/registerAggregateFunctions.cpp
|
Workflow [PR], commit [fec0b3c] Summary: ✅
AI ReviewSummaryThis PR adds Missing context / blind spots
Findings❌ Blockers
Tests
Final VerdictStatus: ❌ Block. Correct both numeric conversion paths and add the focused regressions above. |
|
The separate PR is #125562: it passes |
|
🕵 Merged CI failures on
@groeneai, thanks for the analysis of the |
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
Preserve both `throwIfCannotProduceFinalizedResult` and `getMergedValueBound` in `IAggregateFunction`.
`accurateCastOrNull` truncates fractional `Decimal` values when converting them to integers. Reject probes with a nonzero fractional part before returning the result from `bloomFilterContains`. Inspect the original decimal value to preserve exact probes for wide integer filters, whose conversion back to `Decimal` is unsupported. Add a stateless regression covering all decimal widths, signed and unsigned probes, wide integers, vector inputs, and `NULL` propagation. Related: ClickHouse#101841
Set the documented introduction version of `groupBloomFilter` and `bloomFilterContains` to the current development release, 26.11. Related: ClickHouse#101841
Keep the structured reference in `FunctionDocumentation` and preserve usage, storage and sizing guidance outside the generated region. Allow new empty documentation stubs while retaining protection for existing generated content. Resolve discovered aggregate pages directly instead of requiring a legacy migration-map entry. Related: ClickHouse#101841 Related: ClickHouse#101841 (comment)
Merge ClickHouse/ClickHouse master at 86e0a62. Related: ClickHouse#101841
Resolve conflict in `AggregateFunctionFactory::get`: keep master's window-layout fallback for the nested function and the PR's `assertCombinatorIsSupported` check on the final nested function. Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts: # src/AggregateFunctions/IAggregateFunction.h
Preserve `supportsCombinator` while accepting the removal of `forEachNestedFunction` and the new `NestedStatesScope`. Related: ClickHouse#101841
Treat only exact numeric zero and one as representable in a `Bool` filter. Add scalar, vector, and nullable regression coverage. Related: ClickHouse#101841 (comment)
Convert integral `Decimal` probes with explicit fractional and range checks before hashing. Cover all decimal widths, signed and unsigned boundaries, wide integers, boolean filters, and nullable vector probes. Related: ClickHouse#101841 (comment)
Consolidate nine new stateless tests into five focused suites. Move fractional decimal and execution-shape cases into the type/probe suite, nullable array rejection into combinators, and merge cases into storage. Preserve every existing query and expected output.
Preserve Bloom state normalization alongside the new `[[nodiscard]]` annotations in `AggregateFunctionNullBase`.
Avoid an implicit conversion from `int` when constructing the `ColumnUInt8` null map.
Resolve the documentation generator path conflict using the current master layout. Related: ClickHouse#101841
Preserve aggregate combinator validation while adopting the updated window function handling. Related: ClickHouse#101841
Include upstream updates fetched during conflict resolution. Related: ClickHouse#101841
Align release metadata with 26.12 and describe signed zero and NaN representation semantics. Related: ClickHouse#101841
Adds the
groupBloomFilteraggregate function and thebloomFilterContainsscalar function for memory-efficient probabilistic set-membership testing. This can be used to detect new values, perform approximate deduplication checks, and compare large datasets without materializing exact sets.Related: #11700
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Add the
groupBloomFilteraggregate function for building mergeable Bloom filter states and thebloomFilterContainsscalar function for testing whether values are probably present. Bloom filter sizing can be configured using an expected element count and false-positive rate or directly using the filter size and number of hashes, with an optional seed. The states support the-Stateand-MergeStatecombinators and can be stored inAggregatingMergeTree. Numeric probes, includingDecimal, are converted to the filter's value type using accurate casts.Workflow [PR]
Sync PR [sync-upstream/pr/101841]