APPROX_COUNT_DISTINCT (Lakehouse v2)
使用 HyperLogLog 返回不同值的近似数量。
Analyze 语法
Section titled “Analyze 语法”func.approx_count_distinct(get_column(table, 'user_id'))Analyze 示例
Section titled “Analyze 示例”func.approx_count_distinct(get_column(table, 'user_id'))
┌─────┐│ 985 │└─────┘SQL 语法
Section titled “SQL 语法”APPROX_COUNT_DISTINCT(<user_id>)SQL 示例
Section titled “SQL 示例”SELECT APPROX_COUNT_DISTINCT(user_id) FROM page_views;
┌─────┐│ 985 │└─────┘