跳转到内容

使用 HyperLogLog 返回不同值的近似数量。

func.approx_count_distinct(get_column(table, 'user_id'))
func.approx_count_distinct(get_column(table, 'user_id'))
┌─────┐
│ 985 │
└─────┘
APPROX_COUNT_DISTINCT(<user_id>)
SELECT APPROX_COUNT_DISTINCT(user_id) FROM page_views;
┌─────┐
│ 985 │
└─────┘