-State を付けて構築する方法です。もう 1 つは、Array オブジェクトから bitmap を構築する方法です。
bitmapAnd
bitmap1— 最初のビットマップオブジェクト。AggregateFunction(groupBitmap, T)。 -bitmap2— 2 番目のビットマップオブジェクト。AggregateFunction(groupBitmap, T)。
AggregateFunction(groupBitmap, T)
例
使用例
Query
Response
bitmapAndCardinality
bitmap1— 1 つ目のビットマップオブジェクト。AggregateFunction(groupBitmap, T). -bitmap2— 2 つ目のビットマップオブジェクト。AggregateFunction(groupBitmap, T).
UInt64
例
使用例
Query
Response
bitmapAndnot
bitmap1— 1 番目のビットマップオブジェクト。AggregateFunction(groupBitmap, T)。 -bitmap2— 2 番目のビットマップオブジェクト。AggregateFunction(groupBitmap, T)。
AggregateFunction(groupBitmap, T)
例
使用例
Query
Response
bitmapAndnotCardinality
bitmap1— 1つ目のビットマップオブジェクト。AggregateFunction(groupBitmap, T). -bitmap2— 2つ目のビットマップオブジェクト。AggregateFunction(groupBitmap, T).
bitmap1 AND-NOT bitmap2 の結果における、セットされているビット数を返します。UInt64
例
使用例
Query
Response
bitmapBuild
bitmapToArray とは逆の処理です。
構文
array— 整数配列。Array((U)Int*)
AggregateFunction(groupBitmap, T)
例
使用例
Query
Response
Query
Response
bitmapCardinality
bitmap— ビットマップオブジェクト。AggregateFunction(groupBitmap, T)。
UInt64
例
使用例
Query
Response
bitmapContains
Int8 の値 -1 は 255 と一致します) 。
構文
bitmap— ビットマップオブジェクト。AggregateFunction(groupBitmap, T)。 -value— 確認対象の要素。(U)Int8/16/32/64
1、それ以外は 0 を返します UInt8
例
使用例
Query
Response
Query
Response
bitmapHasAll
bitmap1— 1 つ目のビットマップオブジェクト。AggregateFunction(groupBitmap, T)。 -bitmap2— 2 つ目のビットマップオブジェクト。AggregateFunction(groupBitmap, T)。
1、そうでない場合は 0 を返します UInt8
例
使用例
Query
Response
bitmapHasAny
bitmap1— 1 番目のビットマップオブジェクト。AggregateFunction(groupBitmap, T). -bitmap2— 2 番目のビットマップオブジェクト。AggregateFunction(groupBitmap, T).
1、それ以外の場合は 0 を返します。UInt8
例
使用例
Query
Response
bitmapMax
Int8 の値 -1 は 255 です) 。ビットマップ が空の場合は 0 を返します。
構文
bitmap— ビットマップオブジェクト。AggregateFunction(groupBitmap, T)。
0 を返します。UInt64
例
使用例
Query
Response
Query
Response
bitmapMin
Int8 型の値 -128 は 128 として扱われます) 。ビットマップ が空の場合は UINT32_MAX を返します (ビットマップ の要素型が 32 ビットより広い場合は UINT64_MAX) 。
構文
bitmap— ビットマップオブジェクト。AggregateFunction(groupBitmap, T)。
UINT32_MAX/UINT64_MAX を返します。UInt64
例
使用例
Query
Response
Query
Response
bitmapOr
bitmap1— 1 つ目のビットマップオブジェクト。AggregateFunction(groupBitmap, T)。 -bitmap2— 2 つ目のビットマップオブジェクト。AggregateFunction(groupBitmap, T)。
AggregateFunction(groupBitmap, T)
例
使用例
Query
Response
bitmapOrCardinality
bitmap1— 最初のビットマップオブジェクト。AggregateFunction(groupBitmap, T)。 -bitmap2— 2番目のビットマップオブジェクト。AggregateFunction(groupBitmap, T)。
UInt64
例
使用例
Query
Response
bitmapSubsetInRange
[start, end) 内の element を含む ビットマップ の部分集合を返します。element の値は ビットマップ の要素型 の符号なし整数として比較されます。
構文
bitmap— 部分集合 を抽出する対象のビットマップ。AggregateFunction(groupBitmap, T)。 -start— 範囲の開始 (含む) 。UInt*-end— 範囲の終了 (含まない) 。UInt*
AggregateFunction(groupBitmap, T)
例
使用例
Query
Response
bitmapSubsetLimit
range_start 以上の要素のうち、符号なし順序で最小の値から最大 cardinality_limit 個を選択した部分集合を返します。
構文
bitmap— ビットマップオブジェクト。AggregateFunction(groupBitmap, T)。 -range_start— 範囲の開始 (この値を含む) 。UInt32-cardinality_limit— 部分集合の最大カーディナリティ。UInt32
range_start 以上の要素を最大 cardinality_limit 個含むビットマップを返します。AggregateFunction(groupBitmap, T)
例
使用例
Query
Response
bitmapToArray
T (符号付きまたは符号なし整数) と一致します。関数 bitmapBuild の逆の操作です。
構文
bitmap— 変換対象の ビットマップ。AggregateFunction(groupBitmap, T)。
Array(T)
例
使用例
Query
Response
Query
Response
bitmapTransform
from_array から to_array へのマッピングに従って、ビットマップ 内の要素を置き換えます。
値は ビットマップ 要素型の符号なし整数として解釈されます (bitmapContains と同じドメイン) 。
符号付き ビットマップ では、負の要素は対応する符号なしの要素と一致します (たとえば、Int8 値の -1 は 255 と一致します) 。
to_array 内の値が ビットマップ 要素型に収まらない場合は、BAD_ARGUMENTS が送出されます。from_array 内の値が
収まらない場合は単に見つからないため、対応する置換は適用されません。
構文
bitmap— ビットマップオブジェクト。AggregateFunction(groupBitmap, T). -from_array— 置き換える元のセットビットの Array。Array(T). -to_array— 置き換え先となる新しいセットビットの Array。Array(T).
AggregateFunction(groupBitmap, T)
例
使用例
Query
Response
Query
Response
bitmapXor
bitmap1— 1 つ目のビットマップオブジェクト。AggregateFunction(groupBitmap, T). -bitmap2— 2 つ目のビットマップオブジェクト。AggregateFunction(groupBitmap, T).
AggregateFunction(groupBitmap, T)
例
使用例
Query
Response
bitmapXorCardinality
bitmap1— 1 つ目のビットマップオブジェクト。AggregateFunction(groupBitmap, T). -bitmap2— 2 つ目のビットマップオブジェクト。AggregateFunction(groupBitmap, T).
UInt64
例
使用例
Query
Response
subBitmap
offset 個の要素をスキップした後のビットマップの部分集合を返します。返されるビットマップの最大カーディナリティは cardinality_limit です。
構文
bitmap— ビットマップオブジェクト。AggregateFunction(groupBitmap, T). -offset— 先頭からスキップするセットビット数 (0ベース) 。UInt32-cardinality_limit— 部分集合に含めるセットビットの最大数。UInt32
offset 個の要素をスキップした後、最大 cardinality_limit 個の要素を含むビットマップを返します AggregateFunction(groupBitmap, T)
例
使用例
Query
Response