You are viewing documentation about an older version (1.41.0). View latest version

snowflake.snowpark.functions.bitor_agg

snowflake.snowpark.functions.bitor_agg(e: Union[snowflake.snowpark.column.Column, str]) Column[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.41.0/src/snowflake/snowpark/_functions/scalar_functions.py#L149-L161)

Returns the bitwise OR of all non-NULL records in a group. If all records inside a group are NULL, a NULL is returned.

Example:

>>> df = session.create_dataframe([[15], [26], [12], [14], [8]], schema=["a"])
>>> df.select(bitor_agg("a").alias("result")).collect()
[Row(RESULT=31)]
Copy
Language: English