Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
Aggregate function: 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().
Syntax
import pyspark.sql.functions as sf
sf.bitmap_construct_agg(col=<col>)
Parameters
| Parameter | Type | Description |
|---|---|---|
col |
pyspark.sql.Column or str |
The input column will most likely be bitmap_bit_position(). |
Examples
Example 1: Using bitmap_construct_agg function with bitmap_bit_position.
import pyspark.sql.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...|
+--------------------------------------------+