pyspark.sql.functions.bitmap_construct_agg#
- pyspark.sql.functions.bitmap_construct_agg(col)[source]#
Returns a bitmap with the positions of the bits set from all the values from the input column. The input column will most likely be bitmap_bit_position().
New in version 3.5.0.
- Parameters
- col
Column
or column name The input column will most likely be bitmap_bit_position().
- col
See also
Examples
>>> from pyspark.sql import functions as sf >>> df = spark.createDataFrame([(1,),(2,),(3,)], ["a"]) >>> df.select( ... sf.bitmap_construct_agg(sf.bitmap_bit_position('a')) ... ).show() +--------------------------------------------+ |bitmap_construct_agg(bitmap_bit_position(a))| +--------------------------------------------+ | [07 00 00 00 00 0...| +--------------------------------------------+