bitmap_bit_position
Returns the bit position for the given input column.
Syntax
Python
from pyspark.sql import functions as sf
sf.bitmap_bit_position(col)
Parameters
Parameter | Type | Description |
|---|---|---|
|
| The input column. |
Examples
Example 1: Get bit position for a value
Python
from pyspark.sql import functions as sf
df = spark.createDataFrame([(123,)], ['a'])
df.select('*', sf.bitmap_bit_position('a')).show()
Output
+---+----------------------+
| a|bitmap_bit_position(a)|
+---+----------------------+
|123| 122|
+---+----------------------+