kll_sketch_to_string_bigint
Renvoie une chaîne avec des informations récapitulatives lisibles par l'homme concernant l'esquisse KLL bigint.
Syntaxe
Python
from pyspark.sql import functions as sf
sf.kll_sketch_to_string_bigint(col)
parameter
parameter | Type | Description |
|---|---|---|
|
| La représentation binaire de l’esquisse KLL bigint. |
Renvoie
pyspark.sql.Column: Une représentation textuelle de l'esquisse.
Exemples
Exemple 1 : Get string representation of KLL bigint sketch
Python
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_to_string_bigint("sketch")).first()[0]
"Kll" in result and "N" in result
Output
True