You are viewing documentation about an older version (1.29.1). View latest version

snowflake.snowpark.functions.bitmap_bucket_number

snowflake.snowpark.functions.bitmap_bucket_number(e: Union[Column, str]) Column[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.29.1/snowpark-python/src/snowflake/snowpark/functions.py#L10950-L10964)

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)]
Copy
语言: 中文