mirror of
https://github.com/hanzoai/datastore.git
synced 2026-09-26 13:55:07 +00:00
Avoid calling `rb_max` from `rb_contains` for non-`UInt64` bitmaps. Check the queried value against the representable range for the current storage instead. Add a stateless correctness test and a performance test for `bitmapContains` on `UInt32` bitmaps. Issue: https://github.com/ClickHouse/ClickHouse/issues/65639
38 lines
909 B
XML
38 lines
909 B
XML
<test>
|
|
<settings>
|
|
<max_threads>1</max_threads>
|
|
</settings>
|
|
|
|
<create_query>
|
|
CREATE TABLE bitmap_contains_32
|
|
(
|
|
bm AggregateFunction(groupBitmap, UInt32)
|
|
)
|
|
ENGINE = Memory
|
|
</create_query>
|
|
|
|
<fill_query>
|
|
INSERT INTO bitmap_contains_32
|
|
SELECT groupBitmapState(toUInt32(number))
|
|
FROM numbers(1000000)
|
|
</fill_query>
|
|
|
|
<query>
|
|
WITH (SELECT bm FROM bitmap_contains_32) AS bm
|
|
SELECT countIf(bitmapContains(bm, toUInt64(number % 1000000)))
|
|
FROM numbers(10000000)
|
|
FORMAT Null
|
|
</query>
|
|
|
|
<query>
|
|
WITH (SELECT bm FROM bitmap_contains_32) AS bm
|
|
SELECT countIf(bitmapContains(bm, toUInt64(4294967296 + number % 1000000)))
|
|
FROM numbers(10000000)
|
|
FORMAT Null
|
|
</query>
|
|
|
|
<drop_query>
|
|
DROP TABLE bitmap_contains_32
|
|
</drop_query>
|
|
</test>
|