Clickhouse: [question] How to do arrayToBitmask ?

Created on 28 Sep 2018  路  2Comments  路  Source: ClickHouse/ClickHouse

https://clickhouse.yandex/docs/en/query_language/functions/encoding_functions/
bitmaskToArray() is pretty useful.
Is it possible to encode an array<UInt64> to bitmask?

question

Most helpful comment

With higher-order functions.
Try that

select
   number,
   bitmaskToArray(number) as bitmask,
   arrayReduce('groupBitOr', bitmask) as reverse
from numbers(100);

All 2 comments

With higher-order functions.
Try that

select
   number,
   bitmaskToArray(number) as bitmask,
   arrayReduce('groupBitOr', bitmask) as reverse
from numbers(100);

@filimonov
thank you! help me a lot

Was this page helpful?
0 / 5 - 0 ratings