You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by al...@apache.org on 2021/03/06 00:19:09 UTC

[datasketches-postgresql] branch master updated: fi sketch test

This is an automated email from the ASF dual-hosted git repository.

alsay pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/datasketches-postgresql.git


The following commit(s) were added to refs/heads/master by this push:
     new 8d8c8dd  fi sketch test
8d8c8dd is described below

commit 8d8c8dda6de11332e4385cdcc5999c6464e93b3f
Author: AlexanderSaydakov <Al...@users.noreply.github.com>
AuthorDate: Fri Mar 5 16:18:51 2021 -0800

    fi sketch test
---
 test/fi_sketch_test.sql | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/test/fi_sketch_test.sql b/test/fi_sketch_test.sql
new file mode 100644
index 0000000..f3e3266
--- /dev/null
+++ b/test/fi_sketch_test.sql
@@ -0,0 +1,21 @@
+drop extension if exists datasketches cascade;
+create extension datasketches;
+
+drop table if exists frequent_strings_sketch_test;
+create table frequent_strings_sketch_test(sketch frequent_strings_sketch);
+
+insert into frequent_strings_sketch_test
+  select frequent_strings_sketch_build(8, str)
+  from (values ('a'), ('b'), ('a'), ('a'), ('c')) as t(str)
+;
+
+insert into frequent_strings_sketch_test
+  select frequent_strings_sketch_build(8, str)
+  from (values ('a'), ('c'), ('c'), ('b'), ('a')) as t(str)
+;
+
+select frequent_strings_sketch_result_no_false_negatives(frequent_strings_sketch_merge(8, sketch)) as frequent_strings from frequent_strings_sketch_test;
+select frequent_strings_sketch_to_string(sketch) from frequent_strings_sketch_test;
+
+drop table frequent_strings_sketch_test;
+drop extension datasketches;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org