नोट
इस पेज तक पहुँच के लिए प्रमाणन की आवश्यकता होती है. आप साइन इन करने या निर्देशिकाओं को बदलने का प्रयास कर सकते हैं.
इस पेज तक पहुँच के लिए प्रमाणन की आवश्यकता होती है. आप निर्देशिकाओं को बदलने का प्रयास कर सकते हैं.
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...|
+--------------------------------------------+