kll_sketch_to_string_bigint
Retorna uma string com informações resumidas e legíveis para humanos sobre o esboço bigint do KLL.
Sintaxe
Python
from pyspark.sql import functions as sf
sf.kll_sketch_to_string_bigint(col)
Parâmetros
Parâmetro | Tipo | Descrição |
|---|---|---|
|
| Representação binária do esboço bigint KLL. |
Devoluções
pyspark.sql.ColumnRepresentação do esboço em forma de strings.
Exemplos
Exemplo 1 : Obter a representação em string do esboço bigint KLL
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