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 float sketch buffers together into one.
Syntax
from pyspark.sql import functions as sf
sf.kll_sketch_merge_float(left, right)
Parameters
| Parameter | Type | Description |
|---|---|---|
left |
pyspark.sql.Column or str |
The first KLL float sketch. |
right |
pyspark.sql.Column or str |
The second KLL float sketch. |
Returns
pyspark.sql.Column: The merged KLL sketch.
Examples
Example 1: Merge two KLL float sketches
from pyspark.sql import functions as sf
df = spark.createDataFrame([1.0,2.0,3.0,4.0,5.0], "FLOAT")
sketch_df = df.agg(sf.kll_sketch_agg_float("value").alias("sketch"))
result = sketch_df.select(sf.kll_sketch_merge_float("sketch", "sketch")).first()[0]
result is not None and len(result) > 0
True