DS_THETA_COUNT_DISTINCT(Lakehouse v2)
DataSketches Thetaアルゴリズムを使用して、異なる値のおおよその件数を返します。積集合や差集合などの集合演算をサポートします。
Analyzeの構文
Section titled “Analyzeの構文”func.ds_theta_count_distinct(get_column(table, 'user_id'))Analyzeの例
Section titled “Analyzeの例”func.ds_theta_count_distinct(get_column(table, 'user_id'))
┌───────┐│ 10035 │└───────┘SQLの構文
Section titled “SQLの構文”DS_THETA_COUNT_DISTINCT(<expr>)SELECT DS_THETA_COUNT_DISTINCT(user_id) FROM page_views;
┌───────┐│ 10035 │└───────┘