-State 的聚合函数 groupBitmap 进行构造,另一种是从 Array 对象构造 bitmap。
bitmapAnd
bitmap1— 第一个 bitmap 对象。AggregateFunction(groupBitmap, T)。 -bitmap2— 第二个 bitmap 对象。AggregateFunction(groupBitmap, T)。
AggregateFunction(groupBitmap, T)
示例
使用示例
Query
Response
bitmapAndCardinality
bitmap1— 第一个 bitmap 对象。AggregateFunction(groupBitmap, T)。 -bitmap2— 第二个 bitmap 对象。AggregateFunction(groupBitmap, T)。
UInt64
示例
用法示例
Query
Response
bitmapAndnot
bitmap1— 第一个 bitmap 对象。AggregateFunction(groupBitmap, T)。 -bitmap2— 第二个 bitmap 对象。AggregateFunction(groupBitmap, T)。
AggregateFunction(groupBitmap, T)
示例
使用示例
Query
Response
bitmapAndnotCardinality
bitmap1— 第一个 bitmap 对象。AggregateFunction(groupBitmap, T)。-bitmap2— 第二个 bitmap 对象。AggregateFunction(groupBitmap, T)。
bitmap1 AND-NOT bitmap2 结果中置位的位数。UInt64
示例
使用示例
Query
Response
bitmapBuild
bitmapToArray 的逆操作。
语法
array— 无符号整数数组。Array(UInt*)
AggregateFunction(groupBitmap, T)
示例
用法示例
Query
Response
bitmapCardinality
bitmap— bitmap 对象。AggregateFunction(groupBitmap, T)。
UInt64
示例
使用示例
Query
Response
bitmapContains
bitmap— bitmap 对象。AggregateFunction(groupBitmap, T)。-value— 待检查的元素。(U)Int8/16/32/64
1,否则返回 0。UInt8
示例
使用示例
Query
Response
bitmapHasAll
bitmap1— 第一个 bitmap 对象。AggregateFunction(groupBitmap, T)。 -bitmap2— 第二个 bitmap 对象。AggregateFunction(groupBitmap, T)。
1,否则返回 0。UInt8
示例
用法示例
Query
Response
bitmapHasAny
bitmap1— 第一个 bitmap 对象。AggregateFunction(groupBitmap, T)。 -bitmap2— 第二个 bitmap 对象。AggregateFunction(groupBitmap, T)。
1;否则返回 0。UInt8
示例
使用示例
Query
Response
bitmapMax
0。
语法
bitmap— bitmap 对象。AggregateFunction(groupBitmap, T)。
0。UInt64
示例
使用示例
Query
Response
bitmapMin
UINT32_MAX (如果 bitmap 包含超过 2^64 位,则返回 UINT64_MAX) 。
语法
bitmap— bitmap 对象。AggregateFunction(groupBitmap, T)。
UINT32_MAX/UINT64_MAX UInt64
示例
使用示例
Query
Response
bitmapOr
bitmap1— 第一个 bitmap 对象。AggregateFunction(groupBitmap, T)。 -bitmap2— 第二个 bitmap 对象。AggregateFunction(groupBitmap, T)。
AggregateFunction(groupBitmap, T)
示例
使用示例
Query
Response
bitmapOrCardinality
bitmap1— 第一个 bitmap 对象。AggregateFunction(groupBitmap, T)。 -bitmap2— 第二个 bitmap 对象。AggregateFunction(groupBitmap, T)。
UInt64
示例
用法示例
Query
Response
bitmapSubsetInRange
bitmap— 要从中提取 子集 的 bitmap。AggregateFunction(groupBitmap, T)。-start— 范围起始位置 (含) 。UInt*-end— 范围结束位置 (不含) 。UInt*
AggregateFunction(groupBitmap, T)
示例
使用示例
Query
Response
bitmapSubsetLimit
range_start 开始、最多包含 cardinality_limit 个置位的 bitmap 子集。使用从 1 开始的索引。
语法
bitmap— bitmap 对象。AggregateFunction(groupBitmap, T)。-range_start— 范围的起始位置 (包含) 。UInt32-cardinality_limit— 子集的最大基数。UInt32
range_start 开始最多包含 cardinality_limit 个置位。AggregateFunction(groupBitmap, T)
示例
使用示例
Query
Response
bitmapToArray
bitmapBuild 的逆操作。
语法
bitmap— 要转换的 bitmap。AggregateFunction(groupBitmap, T)。
Array(UInt*)
示例
使用示例
Query
Response
bitmapTransform
from_array 中指定的位值替换为 to_array 中对应的位值,在 bitmap 中最多可修改 N 位。
语法
bitmap— bitmap 对象。AggregateFunction(groupBitmap, T)。-from_array— 需要替换的原始置位组成的 Array。Array(T)。-to_array— 用于替换的新置位组成的 Array。Array(T)。
AggregateFunction(groupBitmap, T)
示例
用法示例
Query
Response
bitmapXor
bitmap1— 第一个 bitmap 对象。AggregateFunction(groupBitmap, T)。 -bitmap2— 第二个 bitmap 对象。AggregateFunction(groupBitmap, T)。
AggregateFunction(groupBitmap, T)
示例
使用示例
Query
Response
bitmapXorCardinality
bitmap1— 第一个 bitmap 对象。AggregateFunction(groupBitmap, T)。-bitmap2— 第二个 bitmap 对象。AggregateFunction(groupBitmap, T)。
UInt64
示例
使用示例
Query
Response
subBitmap
offset 开始。返回的 bitmap 的最大基数为 cardinality_limit。
语法
bitmap— Bitmap 对象。AggregateFunction(groupBitmap, T). -offset— 从开头起要跳过的置位数量 (从零开始计数) 。UInt32-cardinality_limit— 子集中最多包含的置位数量。UInt32
offset 个置位后开始,最多包含 limit 个置位。AggregateFunction(groupBitmap, T)
示例
使用示例
Query
Response