v.21.6New Feature
Add uniqTheta Aggregate Function for Theta Sketch in ClickHouse
Add aggregate function uniqTheta to support Theta Sketch in ClickHouse. #23894. #22609 (Ping Yu).Why it matters
TheuniqTheta function integrates the Theta Sketch algorithm into ClickHouse, allowing users to efficiently estimate the cardinality of large datasets with high accuracy and low memory usage. This helps solve the problem of computing approximate distinct counts at scale, improving performance and resource utilization.How to use it
Users can apply the new aggregate functionuniqTheta in their SQL queries to perform approximate distinct counts using Theta Sketch. For example:SELECT uniqTheta(column_name) FROM table_name;This will return the approximate number of unique values in
column_name using the Theta Sketch algorithm.