snowflake.snowpark.functions.bitmap_bucket_number¶
- snowflake.snowpark.functions.bitmap_bucket_number(e: Union[Column, str]) Column [source]¶
Returns the bucket number of the input value in a bitmap index.
The bucket number is a value between 1 and the number of buckets in the bitmap index.
Example:
>>> df = session.create_dataframe([1, 2, 3, 32768, 32769], schema=["a"]) >>> df.select(bitmap_bucket_number(col("a")).alias("bucket_number")).collect() [Row(BUCKET_NUMBER=1), Row(BUCKET_NUMBER=1), Row(BUCKET_NUMBER=1), Row(BUCKET_NUMBER=1), Row(BUCKET_NUMBER=2)]