次の方法で共有


bitmap_construct_agg

集計関数: 入力列のすべての値から設定されたビットの位置を持つビットマップを返します。 ほとんどの場合、入力列は bitmap_bit_position() になります。

構文

import pyspark.sql.functions as sf

sf.bitmap_construct_agg(col=<col>)

パラメーター

パラメーター タイプ Description
col pyspark.sql.Column または str ほとんどの場合、入力列は bitmap_bit_position() になります。

例示

例 1: bitmap_bit_positionでbitmap_construct_agg関数を使用する。

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...|
+--------------------------------------------+