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 2024/08/23 22:13:58 UTC

(datasketches-bigquery) branch tests updated: added comments with expectations

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

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


The following commit(s) were added to refs/heads/tests by this push:
     new d23f3d4  added comments with expectations
d23f3d4 is described below

commit d23f3d4c989b3ba151ebe55e2bc4104019e15a2e
Author: AlexanderSaydakov <Al...@users.noreply.github.com>
AuthorDate: Fri Aug 23 15:13:43 2024 -0700

    added comments with expectations
---
 cpc/test/cpc_sketch_test.sql     | 2 ++
 hll/test/hll_sketch_test.sql     | 2 ++
 kll/test/kll_sketch_test.sql     | 2 ++
 theta/test/theta_sketch_test.sql | 1 +
 4 files changed, 7 insertions(+)

diff --git a/cpc/test/cpc_sketch_test.sql b/cpc/test/cpc_sketch_test.sql
index 2cbe23c..89f209d 100644
--- a/cpc/test/cpc_sketch_test.sql
+++ b/cpc/test/cpc_sketch_test.sql
@@ -17,6 +17,7 @@
  * under the License.
  */
 
+# expected 5
 select t.cpc_sketch_get_estimate(
   t.cpc_sketch_scalar_union(
     (select t.cpc_sketch_agg_string(str, struct<int, int>(null, null)) from unnest(["a", "b", "c"]) as str),
@@ -34,6 +35,7 @@ insert into t.cpc_sketch
 insert into t.cpc_sketch
 (select t.cpc_sketch_agg_string(cast(value as string), struct<int, int>(null, null)) from unnest(GENERATE_ARRAY(100000, 110000, 1)) as value);
 
+# expected estimate about 20000
 select t.cpc_sketch_to_string(
   t.cpc_sketch_agg_union(sketch, struct<int, int>(null, null)),
   null
diff --git a/hll/test/hll_sketch_test.sql b/hll/test/hll_sketch_test.sql
index d1861e1..edaedf2 100644
--- a/hll/test/hll_sketch_test.sql
+++ b/hll/test/hll_sketch_test.sql
@@ -19,6 +19,7 @@
 
 select t.hll_sketch_get_estimate(t.hll_sketch_agg_string(s, struct<int, string>(null, null))) from unnest(["a", "b", "c"]) as s;
 
+# expected 5
 select t.hll_sketch_get_estimate(
   t.hll_sketch_scalar_union(
     (select t.hll_sketch_agg_string(str, struct<int, string>(10, "HLL_8")) from unnest(["a", "b", "c"]) as str),
@@ -35,6 +36,7 @@ insert into t.hll_sketch
 insert into t.hll_sketch
 (select t.hll_sketch_agg_string(cast(value as string), struct<int, string>(null, null)) from unnest(GENERATE_ARRAY(100000, 110000, 1)) as value);
 
+# expected estimate about 20000
 select t.hll_sketch_to_string(
   t.hll_sketch_agg_union(sketch, struct<int, string>(null, null))
 ) from t.hll_sketch;
diff --git a/kll/test/kll_sketch_test.sql b/kll/test/kll_sketch_test.sql
index 5af0072..47db440 100644
--- a/kll/test/kll_sketch_test.sql
+++ b/kll/test/kll_sketch_test.sql
@@ -32,12 +32,14 @@ select t.kll_sketch_float_get_quantile(t.kll_sketch_float_merge(sketch, null), 0
 
 drop table t.kll_sketch;
 
+# expected false
 select t.kll_sketch_float_kolmogorov_smirnov(
   (select t.kll_sketch_float_build(value, null) from unnest([1,2,3,4,5,6,7,8,9,10]) as value),
   (select t.kll_sketch_float_build(value, null) from unnest([1,2,3,4,5,6,7,8,9,10]) as value),
   0.05
 );
 
+# expected true
 select t.kll_sketch_float_kolmogorov_smirnov(
   (select t.kll_sketch_float_build(value, null) from unnest([1,2,3,4,5,6,7,8,9,10]) as value),
   (select t.kll_sketch_float_build(value, null) from unnest([11,12,13,14,15,16,17,18,19,20]) as value),
diff --git a/theta/test/theta_sketch_test.sql b/theta/test/theta_sketch_test.sql
index fa874a6..b54df50 100644
--- a/theta/test/theta_sketch_test.sql
+++ b/theta/test/theta_sketch_test.sql
@@ -24,6 +24,7 @@ insert into t.theta_sketch
 insert into t.theta_sketch
 (select t.theta_sketch_agg_string(cast(value as string), struct<int, int>(null, null)) from unnest(GENERATE_ARRAY(100000, 110000, 1)) as value);
 
+# expected estimate about 20000
 select t.theta_sketch_to_string(
   t.theta_sketch_agg_union(sketch, struct<int, int>(null, null)),
   null


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