Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
Applies to:
Databricks SQL
Databricks Runtime 13.3 LTS and above
Returns the 0-based bit position of a given BIGINT number within a bucket.
In combination with the bitmap_bucket_number() function it uniquely identifies any BIGINT number.
Syntax
bitmap_bit_position(expr)
Arguments
expr: ABIGINTexpression.
Returns
A BIGINT between 0 and 32767.
If expr is >0 the result matches: (expr - 1) % 32768.
If expr is <= 0 the result matches: abs(expr) % 32768.
Examples
> SELECT bitmap_bucket_number(1), bitmap_bit_position(1);
1 0
> SELECT bitmap_bucket_number(32768), bitmap_bit_position(32768);
1 32767
> SELECT bitmap_bucket_number(32769), bitmap_bit_position(32769);
2 0
> SELECT bitmap_bucket_number(0), bitmap_bit_position(0);
0 0
> SELECT bitmap_bucket_number(-32767), bitmap_bit_position(-32767);
0 32767
> SELECT bitmap_bucket_number(-32768), bitmap_bit_position(-32768);
-1 0