apache / datasketches-postgresql

PostgreSQL extension providing approximate algorithms based on apache/datasketches-cpp
https://datasketches.apache.org
Apache License 2.0
86 stars 11 forks source link

add theta-sketch intesection agg function #26

Closed phstudy closed 4 years ago

phstudy commented 4 years ago

add theta-sketch intesection agg function

example:

postgres=# create table theta_sketch_test(sketch theta_sketch);
postgres=# insert into theta_sketch_test select theta_sketch_build(1);
postgres=# insert into theta_sketch_test select theta_sketch_build(1);
postgres=# select theta_sketch_get_estimate(theta_sketch_intersection(sketch)) from theta_sketch_test;
 theta_sketch_get_estimate 
---------------------------
                         1
(1 row)
AlexanderSaydakov commented 4 years ago

Thank you!