[
https://issues.apache.org/jira/browse/SPARK-53877?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dongjoon Hyun updated SPARK-53877:
----------------------------------
Parent Issue: SPARK-54360 (was: SPARK-51166)
> Add bitmap_and_agg aggregation function
> ---------------------------------------
>
> Key: SPARK-53877
> URL: https://issues.apache.org/jira/browse/SPARK-53877
> Project: Spark
> Issue Type: Sub-task
> Components: Documentation, PySpark, SQL
> Affects Versions: 4.1.0
> Reporter: Uros Stojkovic
> Assignee: Uros Stojkovic
> Priority: Major
> Labels: pull-request-available
> Fix For: 4.1.0
>
> Original Estimate: 168h
> Remaining Estimate: 168h
>
> Introduce a function analogous to bitmap_or_agg, but performing a bitwise AND
> operation instead of OR.
> Specifically, the bitmap_and_agg function should output a bitmap that
> represents the bitwise AND of all bitmaps in the input column. The input
> column must contain bitmaps generated from bitmap_construct_agg().
> Example:
> {code:java}
> >>> from pyspark.sql import functions as sf
> >>> df = spark.createDataFrame([("30",),("70",),("F0",)], ["a"])
> >>> df.select(sf.bitmap_and_agg(sf.to_binary(df.a, sf.lit("hex")))).show()
> +--------------------------------+
> |bitmap_and_agg(to_binary(a, hex))|
> +--------------------------------+
> | [30 00 00 00 00 0...|
> +--------------------------------+{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]