This is an automated email from the ASF dual-hosted git repository.
alsay pushed a commit to branch sum_estimate
in repository https://gitbox.apache.org/repos/asf/datasketches-bigquery.git
The following commit(s) were added to refs/heads/sum_estimate by this push:
new 7bf43d9 added test
7bf43d9 is described below
commit 7bf43d90132f3f5f088dc570bdd293e224d2c1ac
Author: AlexanderSaydakov <[email protected]>
AuthorDate: Mon Oct 7 16:38:44 2024 -0700
added test
---
tuple/test/tuple_sketch_int64_test.sql | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/tuple/test/tuple_sketch_int64_test.sql
b/tuple/test/tuple_sketch_int64_test.sql
index fb0f682..2641923 100644
--- a/tuple/test/tuple_sketch_int64_test.sql
+++ b/tuple/test/tuple_sketch_int64_test.sql
@@ -35,6 +35,11 @@ select
$BQ_DATASET.tuple_sketch_int64_get_estimate_and_bounds(
2
) from $BQ_DATASET.tuple_sketch;
+select $BQ_DATASET.tuple_sketch_int64_get_sum_estimate_and_bounds(
+ $BQ_DATASET.tuple_sketch_int64_agg_union(sketch),
+ 2
+) from $BQ_DATASET.tuple_sketch;
+
# expected estimate about 20000
select $BQ_DATASET.tuple_sketch_int64_to_string(
$BQ_DATASET.tuple_sketch_int64_agg_union(sketch)
@@ -78,6 +83,12 @@ select
$BQ_DATASET.tuple_sketch_int64_get_estimate_and_bounds_seed(
111
) from $BQ_DATASET.tuple_sketch;
+select $BQ_DATASET.tuple_sketch_int64_get_sum_estimate_and_bounds_seed(
+ $BQ_DATASET.tuple_sketch_int64_agg_union_lgk_seed_mode(sketch,
STRUCT<BYTEINT, INT64, STRING>(10, 111, "NOP")),
+ 2,
+ 111
+) from $BQ_DATASET.tuple_sketch;
+
# expected estimate about 20000
select $BQ_DATASET.tuple_sketch_int64_to_string_seed(
$BQ_DATASET.tuple_sketch_int64_agg_union_lgk_seed_mode(sketch,
STRUCT<BYTEINT, INT64, STRING>(10, 111, "NOP")),
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]