Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Merges two KLL bigint sketch buffers together into one.
Syntax
from pyspark.sql import functions as sf
sf.kll_sketch_merge_bigint(left, right)
Parameters
| Parameter | Type | Description |
|---|---|---|
left |
pyspark.sql.Column or str |
The first KLL bigint sketch. |
right |
pyspark.sql.Column or str |
The second KLL bigint sketch. |
Returns
pyspark.sql.Column: The merged KLL sketch.
Examples
Example 1: Merge two KLL bigint sketches
from pyspark.sql import functions as sf
df = spark.createDataFrame([1,2,3,4,5], "INT")
sketch_df = df.agg(sf.kll_sketch_agg_bigint("value").alias("sketch"))
result = sketch_df.select(sf.kll_sketch_merge_bigint("sketch", "sketch")).first()[0]
result is not None and len(result) > 0
True