BITMAP_BUCKET_OFFSET

See: Understanding How Bitmaps Identify Distinct Values.

Syntax

BITMAP_BUCKET_OFFSET( <expr> )

Parameters

expr

A numeric expression

Returns

Given a numeric input, returns the “offset” of the input in the bitmap. Essentially, BITMAP_BUCKET_OFFSET + BITMAP_BIT_POSITION = INPUT_VALUE.

Example

SELECT input, BITMAP_BUCKET_OFFSET(input) FROM T

input

BITMAP_BUCKET_OFFSET

0

0

1

0

9999

0

10000

10000

-1

-10000