bitmap-union-int
Descriptionβ
Counts the number of distinct values in columns of type TINYINT, SMALLINT and INT. The return value is the same as COUNT(DISTINCT expr)
Syntaxβ
BITMAP_UNION_INT(<expr>)
Parametersβ
Parameter | Description |
---|---|
<expr> | Supports columns or column expressions of type TINYINT, SMALLINT and INT |
Return Valueβ
Returns the number of distinct values in a column.
Exampleβ
select dt,page,bitmap_to_string(user_id) from pv_bitmap;
+------+------+---------------------------+
| dt | page | bitmap_to_string(user_id) |
+------+------+---------------------------+
| 1 | 100 | 100,200,300 |
| 1 | 300 | 300 |
| 2 | 200 | 300 |
+------+------+---------------------------+
select bitmap_union_int(dt) from pv_bitmap;
+----------------------+
| bitmap_union_int(dt) |
+----------------------+
| 2 |
+----------------------+