DS_THETA_COUNT_DISTINCT (Lakehouse v2)
Retorna uma contagem distinta aproximada usando o algoritmo Theta do DataSketches. Oferece suporte a operações de conjunto, como interseção e diferença.
Sintaxe no Analyze
Seção intitulada “Sintaxe no Analyze”func.ds_theta_count_distinct(get_column(table, 'user_id'))Exemplos no Analyze
Seção intitulada “Exemplos no Analyze”func.ds_theta_count_distinct(get_column(table, 'user_id'))
┌───────┐│ 10035 │└───────┘Sintaxe SQL
Seção intitulada “Sintaxe SQL”DS_THETA_COUNT_DISTINCT(<expr>)Exemplos de SQL
Seção intitulada “Exemplos de SQL”SELECT DS_THETA_COUNT_DISTINCT(user_id) FROM page_views;
┌───────┐│ 10035 │└───────┘