This is an automated email from the ASF dual-hosted git repository. alsay pushed a commit to branch fix_links in repository https://gitbox.apache.org/repos/asf/datasketches-bigquery.git
commit 6fe331e09d091c52d0c59762bb74b3c48c361aac Author: AlexanderSaydakov <[email protected]> AuthorDate: Tue Nov 19 12:07:58 2024 -0800 fixed links to sqlx --- cpc/README.md | 28 ++++++++++++------------- fi/README.md | 8 +++---- hll/README.md | 22 ++++++++++---------- kll/README.md | 30 +++++++++++++-------------- readme_generator.py | 6 ++---- tdigest/README.md | 20 +++++++++--------- theta/README.md | 48 +++++++++++++++++++++--------------------- tuple/README.md | 60 ++++++++++++++++++++++++++--------------------------- 8 files changed, 110 insertions(+), 112 deletions(-) diff --git a/cpc/README.md b/cpc/README.md index adb5a91..be23b32 100644 --- a/cpc/README.md +++ b/cpc/README.md @@ -39,20 +39,20 @@ page for how to contact us. | Function Name | Function Type | Signature | Description | |---|---|---|---| -| [cpc_sketch_agg_union](cpc_sketch_agg_union.sqlx) | AGGREGATE | (sketch BYTES) -> BYTES | Creates a sketch that represents the union of the given column of sketches.\<br\>\<br\>Param sketch: the column of sketches. Each as BYTES.\<br\>Defaults: lg\_k = 12, seed = 9001.\<br\>Returns: a Compact, Compressed CPC Sketch, as BYTES. | -| [cpc_sketch_agg_string](cpc_sketch_agg_string.sqlx) | AGGREGATE | (str STRING) -> BYTES | Creates a sketch that represents the cardinality of the given STRING column.\<br\>\<br\>Param str: the STRING column of identifiers.\<br\>Defaults: lg\_k = 12, seed = 9001.\<br\>Returns: a Compact, Compressed CPC Sketch, as BYTES | -| [cpc_sketch_agg_int64](cpc_sketch_agg_int64.sqlx) | AGGREGATE | (value INT64) -> BYTES | Creates a sketch that represents the cardinality of the given INT64 column.\<br\>\<br\>Param value: the INT64 column of identifiers.\<br\>Defaults: lg\_k = 12, seed = 9001.\<br\>Returns: a Compact, Compressed CPC Sketch, as BYTES | -| [cpc_sketch_agg_string_lgk_seed](cpc_sketch_agg_string_lgk_seed.sqlx) | AGGREGATE | (str STRING, params STRUCT<lg_k BYTEINT, seed INT64> NOT AGGREGATE) -> BYTES | Creates a sketch that represents the cardinality of the given STRING column.\<br\>\<br\>Param str: the STRING column of identifiers.\<br\>Param lg\_k: the sketch accuracy/size parameter as an integer in the range \[4, 26\].\<br\>Param seed: the seed to be used by the underlying hash function.\<br\>Returns: a Compact, Compress [...] -| [cpc_sketch_agg_union_lgk_seed](cpc_sketch_agg_union_lgk_seed.sqlx) | AGGREGATE | (sketch BYTES, params STRUCT<lg_k BYTEINT, seed INT64> NOT AGGREGATE) -> BYTES | Creates a sketch that represents the union of the given column of sketches.\<br\>\<br\>Param sketch: the column of sketches. Each as BYTES.\<br\>Param lg\_k: the sketch accuracy/size parameter as an integer in the range \[4, 26\].\<br\>Param seed: This is used to confirm that the given sketches were configured with the correc [...] -| [cpc_sketch_agg_int64_lgk_seed](cpc_sketch_agg_int64_lgk_seed.sqlx) | AGGREGATE | (value INT64, params STRUCT<lg_k BYTEINT, seed INT64> NOT AGGREGATE) -> BYTES | Creates a sketch that represents the cardinality of the given INT64 column.\<br\>\<br\>Param value: the INT64 column of identifiers.\<br\>Param lg\_k: the sketch accuracy/size parameter as an integer in the range \[4, 26\].\<br\>Param seed: the seed to be used by the underlying hash function.\<br\>Returns: a Compact, Compresse [...] -| [cpc_sketch_get_estimate](cpc_sketch_get_estimate.sqlx) | SCALAR | (sketch BYTES) -> FLOAT64 | Gets cardinality estimate and bounds from given sketch.\<br\>\<br\>Param sketch: The given sketch to query as BYTES.\<br\>Defaults: seed = 9001.\<br\>Returns: a FLOAT64 value as the cardinality estimate. | -| [cpc_sketch_to_string](cpc_sketch_to_string.sqlx) | SCALAR | (sketch BYTES) -> STRING | Returns a summary string that represents the state of the given sketch.\<br\>\<br\>Param sketch the given sketch as BYTES.\<br\>Defaults: seed = 9001.\<br\>Returns: a STRING that represents the state of the given sketch. | -| [cpc_sketch_get_estimate_seed](cpc_sketch_get_estimate_seed.sqlx) | SCALAR | (sketch BYTES, seed INT64) -> FLOAT64 | Gets cardinality estimate and bounds from given sketch.\<br\>\<br\>Param sketch: The given sketch to query as BYTES.\<br\>Param seed: This is used to confirm that the given sketch was configured with the correct seed.\<br\>Returns: a FLOAT64 value as the cardinality estimate. | -| [cpc_sketch_to_string_seed](cpc_sketch_to_string_seed.sqlx) | SCALAR | (sketch BYTES, seed INT64) -> STRING | Returns a summary string that represents the state of the given sketch.\<br\>\<br\>Param sketch the given sketch as BYTES.\<br\>Param seed: This is used to confirm that the given sketch was configured with the correct seed.\<br\>Returns: a STRING that represents the state of the given sketch. | -| [cpc_sketch_union](cpc_sketch_union.sqlx) | SCALAR | (sketchA BYTES, sketchB BYTES) -> BYTES | Computes a sketch that represents the scalar union of the two given sketches.\<br\>\<br\>Param sketchA: the first sketch as BYTES.\<br\>Param sketchB: the second sketch as BYTES.\<br\>Defaults: lg\_k = 12, seed = 9001.\<br\>Returns: a CPC Sketch, as BYTES. | -| [cpc_sketch_get_estimate_and_bounds](cpc_sketch_get_estimate_and_bounds.sqlx) | SCALAR | (sketch BYTES, num_std_devs BYTEINT) -> STRUCT<estimate FLOAT64, lower_bound FLOAT64, upper_bound FLOAT64> | Gets cardinality estimate and bounds from given sketch.\<br\> \<br\>Param sketch: The given sketch to query as bytes.\<br\>Param num\_std\_devs: The returned bounds will be based on the statistical confidence interval determined by the given number of standard deviations\<br\> from the ret [...] -| [cpc_sketch_union_lgk_seed](cpc_sketch_union_lgk_seed.sqlx) | SCALAR | (sketchA BYTES, sketchB BYTES, lg_k BYTEINT, seed INT64) -> BYTES | Computes a sketch that represents the scalar union of the two given sketches.\<br\>\<br\>Param sketchA: the first sketch as BYTES.\<br\>Param sketchB: the second sketch as BYTES.\<br\>Param lg\_k: the sketch accuracy/size parameter as an integer in the range \[4, 26\].\<br\>Param seed: This is used to confirm that the given sketches were configured [...] -| [cpc_sketch_get_estimate_and_bounds_seed](cpc_sketch_get_estimate_and_bounds_seed.sqlx) | SCALAR | (sketch BYTES, num_std_devs BYTEINT, seed INT64) -> STRUCT<estimate FLOAT64, lower_bound FLOAT64, upper_bound FLOAT64> | Gets cardinality estimate and bounds from given sketch.\<br\> \<br\>Param sketch: The given sketch to query as bytes.\<br\>Param num\_std\_devs: The returned bounds will be based on the statistical confidence interval determined by the given number of standard deviatio [...] +| [cpc_sketch_agg_union](../definitions/cpc/cpc_sketch_agg_union.sqlx) | AGGREGATE | (sketch BYTES) -> BYTES | Creates a sketch that represents the union of the given column of sketches.\<br\>\<br\>Param sketch: the column of sketches. Each as BYTES.\<br\>Defaults: lg\_k = 12, seed = 9001.\<br\>Returns: a Compact, Compressed CPC Sketch, as BYTES. | +| [cpc_sketch_agg_string](../definitions/cpc/cpc_sketch_agg_string.sqlx) | AGGREGATE | (str STRING) -> BYTES | Creates a sketch that represents the cardinality of the given STRING column.\<br\>\<br\>Param str: the STRING column of identifiers.\<br\>Defaults: lg\_k = 12, seed = 9001.\<br\>Returns: a Compact, Compressed CPC Sketch, as BYTES | +| [cpc_sketch_agg_int64](../definitions/cpc/cpc_sketch_agg_int64.sqlx) | AGGREGATE | (value INT64) -> BYTES | Creates a sketch that represents the cardinality of the given INT64 column.\<br\>\<br\>Param value: the INT64 column of identifiers.\<br\>Defaults: lg\_k = 12, seed = 9001.\<br\>Returns: a Compact, Compressed CPC Sketch, as BYTES | +| [cpc_sketch_agg_string_lgk_seed](../definitions/cpc/cpc_sketch_agg_string_lgk_seed.sqlx) | AGGREGATE | (str STRING, params STRUCT<lg_k BYTEINT, seed INT64> NOT AGGREGATE) -> BYTES | Creates a sketch that represents the cardinality of the given STRING column.\<br\>\<br\>Param str: the STRING column of identifiers.\<br\>Param lg\_k: the sketch accuracy/size parameter as an integer in the range \[4, 26\].\<br\>Param seed: the seed to be used by the underlying hash function.\<br\>Returns: [...] +| [cpc_sketch_agg_union_lgk_seed](../definitions/cpc/cpc_sketch_agg_union_lgk_seed.sqlx) | AGGREGATE | (sketch BYTES, params STRUCT<lg_k BYTEINT, seed INT64> NOT AGGREGATE) -> BYTES | Creates a sketch that represents the union of the given column of sketches.\<br\>\<br\>Param sketch: the column of sketches. Each as BYTES.\<br\>Param lg\_k: the sketch accuracy/size parameter as an integer in the range \[4, 26\].\<br\>Param seed: This is used to confirm that the given sketches were configu [...] +| [cpc_sketch_agg_int64_lgk_seed](../definitions/cpc/cpc_sketch_agg_int64_lgk_seed.sqlx) | AGGREGATE | (value INT64, params STRUCT<lg_k BYTEINT, seed INT64> NOT AGGREGATE) -> BYTES | Creates a sketch that represents the cardinality of the given INT64 column.\<br\>\<br\>Param value: the INT64 column of identifiers.\<br\>Param lg\_k: the sketch accuracy/size parameter as an integer in the range \[4, 26\].\<br\>Param seed: the seed to be used by the underlying hash function.\<br\>Returns: a [...] +| [cpc_sketch_get_estimate](../definitions/cpc/cpc_sketch_get_estimate.sqlx) | SCALAR | (sketch BYTES) -> FLOAT64 | Gets cardinality estimate and bounds from given sketch.\<br\>\<br\>Param sketch: The given sketch to query as BYTES.\<br\>Defaults: seed = 9001.\<br\>Returns: a FLOAT64 value as the cardinality estimate. | +| [cpc_sketch_to_string](../definitions/cpc/cpc_sketch_to_string.sqlx) | SCALAR | (sketch BYTES) -> STRING | Returns a summary string that represents the state of the given sketch.\<br\>\<br\>Param sketch the given sketch as BYTES.\<br\>Defaults: seed = 9001.\<br\>Returns: a STRING that represents the state of the given sketch. | +| [cpc_sketch_get_estimate_seed](../definitions/cpc/cpc_sketch_get_estimate_seed.sqlx) | SCALAR | (sketch BYTES, seed INT64) -> FLOAT64 | Gets cardinality estimate and bounds from given sketch.\<br\>\<br\>Param sketch: The given sketch to query as BYTES.\<br\>Param seed: This is used to confirm that the given sketch was configured with the correct seed.\<br\>Returns: a FLOAT64 value as the cardinality estimate. | +| [cpc_sketch_to_string_seed](../definitions/cpc/cpc_sketch_to_string_seed.sqlx) | SCALAR | (sketch BYTES, seed INT64) -> STRING | Returns a summary string that represents the state of the given sketch.\<br\>\<br\>Param sketch the given sketch as BYTES.\<br\>Param seed: This is used to confirm that the given sketch was configured with the correct seed.\<br\>Returns: a STRING that represents the state of the given sketch. | +| [cpc_sketch_union](../definitions/cpc/cpc_sketch_union.sqlx) | SCALAR | (sketchA BYTES, sketchB BYTES) -> BYTES | Computes a sketch that represents the scalar union of the two given sketches.\<br\>\<br\>Param sketchA: the first sketch as BYTES.\<br\>Param sketchB: the second sketch as BYTES.\<br\>Defaults: lg\_k = 12, seed = 9001.\<br\>Returns: a CPC Sketch, as BYTES. | +| [cpc_sketch_get_estimate_and_bounds](../definitions/cpc/cpc_sketch_get_estimate_and_bounds.sqlx) | SCALAR | (sketch BYTES, num_std_devs BYTEINT) -> STRUCT<estimate FLOAT64, lower_bound FLOAT64, upper_bound FLOAT64> | Gets cardinality estimate and bounds from given sketch.\<br\> \<br\>Param sketch: The given sketch to query as bytes.\<br\>Param num\_std\_devs: The returned bounds will be based on the statistical confidence interval determined by the given number of standard deviations\ [...] +| [cpc_sketch_union_lgk_seed](../definitions/cpc/cpc_sketch_union_lgk_seed.sqlx) | SCALAR | (sketchA BYTES, sketchB BYTES, lg_k BYTEINT, seed INT64) -> BYTES | Computes a sketch that represents the scalar union of the two given sketches.\<br\>\<br\>Param sketchA: the first sketch as BYTES.\<br\>Param sketchB: the second sketch as BYTES.\<br\>Param lg\_k: the sketch accuracy/size parameter as an integer in the range \[4, 26\].\<br\>Param seed: This is used to confirm that the given sketch [...] +| [cpc_sketch_get_estimate_and_bounds_seed](../definitions/cpc/cpc_sketch_get_estimate_and_bounds_seed.sqlx) | SCALAR | (sketch BYTES, num_std_devs BYTEINT, seed INT64) -> STRUCT<estimate FLOAT64, lower_bound FLOAT64, upper_bound FLOAT64> | Gets cardinality estimate and bounds from given sketch.\<br\> \<br\>Param sketch: The given sketch to query as bytes.\<br\>Param num\_std\_devs: The returned bounds will be based on the statistical confidence interval determined by the given number o [...] **Examples:** diff --git a/fi/README.md b/fi/README.md index dcbbabf..16cf854 100644 --- a/fi/README.md +++ b/fi/README.md @@ -38,10 +38,10 @@ page for how to contact us. | Function Name | Function Type | Signature | Description | |---|---|---|---| -| [frequent_strings_sketch_merge](frequent_strings_sketch_merge.sqlx) | AGGREGATE | (sketch BYTES, lg_max_map_size BYTEINT NOT AGGREGATE) -> BYTES | Merges sketches from the given column.\<br\>\<br\>Param sketch: the column of values.\<br\>Param lg\_max\_map\_size: the sketch accuracy/size parameter as an integer not less than 3.\<br\>Returns: a serialized Frequent Strings sketch as BYTES. | -| [frequent_strings_sketch_build](frequent_strings_sketch_build.sqlx) | AGGREGATE | (item STRING, weight INT64, lg_max_map_size BYTEINT NOT AGGREGATE) -> BYTES | Creates a sketch that represents frequencies of the given column.\<br\>\<br\>Param item: the column of STRING values.\<br\>Param weight: the amount by which the weight of the item should be increased.\<br\>Param lg\_max\_map\_size: the sketch accuracy/size parameter as a BYTEINT not less than 3.\<br\>Returns: a Frequent Strings [...] -| [frequent_strings_sketch_to_string](frequent_strings_sketch_to_string.sqlx) | SCALAR | (sketch BYTES) -> STRING | Returns a summary string that represents the state of the given sketch.\<br\>\<br\>Param sketch: the given sketch as sketch encoded bytes.\<br\>Returns: a string that represents the state of the given sketch. | -| [frequent_strings_sketch_get_result](frequent_strings_sketch_get_result.sqlx) | SCALAR | (sketch BYTES, error_type STRING, threshold INT64) -> ARRAY<STRUCT<item STRING, estimate INT64, lower_bound INT64, upper_bound INT64>> | Returns an array of rows that include frequent items, estimates, lower and upper bounds\<br\>given an error\_type and a threshold.\<br\>\<br\>Param sketch: the given sketch as sketch encoded bytes.\<br\>Param error\_type: determines whether no false positives or n [...] +| [frequent_strings_sketch_merge](../definitions/fi/frequent_strings_sketch_merge.sqlx) | AGGREGATE | (sketch BYTES, lg_max_map_size BYTEINT NOT AGGREGATE) -> BYTES | Merges sketches from the given column.\<br\>\<br\>Param sketch: the column of values.\<br\>Param lg\_max\_map\_size: the sketch accuracy/size parameter as an integer not less than 3.\<br\>Returns: a serialized Frequent Strings sketch as BYTES. | +| [frequent_strings_sketch_build](../definitions/fi/frequent_strings_sketch_build.sqlx) | AGGREGATE | (item STRING, weight INT64, lg_max_map_size BYTEINT NOT AGGREGATE) -> BYTES | Creates a sketch that represents frequencies of the given column.\<br\>\<br\>Param item: the column of STRING values.\<br\>Param weight: the amount by which the weight of the item should be increased.\<br\>Param lg\_max\_map\_size: the sketch accuracy/size parameter as a BYTEINT not less than 3.\<br\>Returns: a [...] +| [frequent_strings_sketch_to_string](../definitions/fi/frequent_strings_sketch_to_string.sqlx) | SCALAR | (sketch BYTES) -> STRING | Returns a summary string that represents the state of the given sketch.\<br\>\<br\>Param sketch: the given sketch as sketch encoded bytes.\<br\>Returns: a string that represents the state of the given sketch. | +| [frequent_strings_sketch_get_result](../definitions/fi/frequent_strings_sketch_get_result.sqlx) | SCALAR | (sketch BYTES, error_type STRING, threshold INT64) -> ARRAY<STRUCT<item STRING, estimate INT64, lower_bound INT64, upper_bound INT64>> | Returns an array of rows that include frequent items, estimates, lower and upper bounds\<br\>given an error\_type and a threshold.\<br\>\<br\>Param sketch: the given sketch as sketch encoded bytes.\<br\>Param error\_type: determines whether no fa [...] **Examples:** diff --git a/hll/README.md b/hll/README.md index 6451854..fcd326e 100644 --- a/hll/README.md +++ b/hll/README.md @@ -37,17 +37,17 @@ page for how to contact us. | Function Name | Function Type | Signature | Description | |---|---|---|---| -| [hll_sketch_agg_string](hll_sketch_agg_string.sqlx) | AGGREGATE | (str STRING) -> BYTES | Creates a sketch that represents the cardinality of the given STRING column.\<br\>\<br\>Param str: the STRING column of identifiers.\<br\>Defaults: lg\_k = 12, tgt\_type = HLL\_4.\<br\>Returns: an HLL Sketch, as BYTES. | -| [hll_sketch_agg_union](hll_sketch_agg_union.sqlx) | AGGREGATE | (sketch BYTES) -> BYTES | Creates a sketch that represents the union of the given column of sketches.\<br\>\<br\>Param sketch: the column of sketches. Each as BYTES.\<br\>Defaults: lg\_k = 12, tgt\_type = HLL\_4.\<br\>Returns: an HLL Sketch, as BYTES. | -| [hll_sketch_agg_int64](hll_sketch_agg_int64.sqlx) | AGGREGATE | (value INT64) -> BYTES | Creates a sketch that represents the cardinality of the given INT64 column.\<br\>\<br\>Param value: the INT64 column of identifiers.\<br\>Defaults: lg\_k = 12, tgt\_type = HLL\_4.\<br\>Returns: an HLL Sketch, as BYTES. | -| [hll_sketch_agg_string_lgk_type](hll_sketch_agg_string_lgk_type.sqlx) | AGGREGATE | (str STRING, params STRUCT<lg_k BYTEINT, tgt_type STRING> NOT AGGREGATE) -> BYTES | Creates a sketch that represents the cardinality of the given STRING column.\<br\>\<br\>Param str: the STRING column of identifiers.\<br\>Param lg\_k: the sketch accuracy/size parameter as an integer in the range \[4, 21\].\<br\>Param tgt\_type: The HLL type to use: one of {"HLL\_4", "HLL\_6", "HLL\_8"}.\<br\>Returns: an [...] -| [hll_sketch_agg_union_lgk_type](hll_sketch_agg_union_lgk_type.sqlx) | AGGREGATE | (sketch BYTES, params STRUCT<lg_k BYTEINT, tgt_type STRING> NOT AGGREGATE) -> BYTES | Creates a sketch that represents the union of the given column of sketches.\<br\>\<br\>Param sketch: the column of sketches. Each as BYTES.\<br\>Param lg\_k: the sketch accuracy/size parameter as an integer in the range \[4, 21\].\<br\>Param tgt\_type: The HLL type to use: one of {"HLL\_4", "HLL\_6", "HLL\_8"}.\<br\>Retu [...] -| [hll_sketch_agg_int64_lgk_type](hll_sketch_agg_int64_lgk_type.sqlx) | AGGREGATE | (value INT64, params STRUCT<lg_k BYTEINT, tgt_type STRING> NOT AGGREGATE) -> BYTES | Creates a sketch that represents the cardinality of the given INT64 column.\<br\>\<br\>Param value: the INT64 column of identifiers.\<br\>Param lg\_k: the sketch accuracy/size parameter as an integer in the range \[4, 21\].\<br\>Param tgt\_type: The HLL type to use: one of {"HLL\_4", "HLL\_6", "HLL\_8"}.\<br\>Returns: an [...] -| [hll_sketch_get_estimate](hll_sketch_get_estimate.sqlx) | SCALAR | (sketch BYTES) -> FLOAT64 | Returns a summary string that represents the state of the given sketch.\<br\>\<br\>Param sketch: the given sketch as BYTES.\<br\>Returns: the cardinality estimate as FLOAT64 value. | -| [hll_sketch_to_string](hll_sketch_to_string.sqlx) | SCALAR | (sketch BYTES) -> STRING | Returns a summary string that represents the state of the given sketch.\<br\>\<br\>Param sketch: the given sketch as BYTES.\<br\>Returns: a STRING that represents the state of the given sketch. | -| [hll_sketch_union](hll_sketch_union.sqlx) | SCALAR | (sketchA BYTES, sketchB BYTES) -> BYTES | Computes a sketch that represents the union of the two given sketches.\<br\>\<br\>Param sketchA: the first sketch as bytes.\<br\>Param sketchB: the second sketch as bytes.\<br\>Defaults: lg\_k = 12, tgt\_type = HLL\_4.\<br\>Returns: an HLL Sketch, as BYTES. | -| [hll_sketch_union_lgk_type](hll_sketch_union_lgk_type.sqlx) | SCALAR | (sketchA BYTES, sketchB BYTES, lg_k BYTEINT, tgt_type STRING) -> BYTES | Computes a sketch that represents the union of the two given sketches.\<br\>\<br\>Param sketchA: the first sketch as bytes.\<br\>Param sketchB: the second sketch as bytes.\<br\>Param lg\_k: the sketch accuracy/size parameter as an integer in the range \[4, 21\].\<br\>Param tgt\_type: The HLL type to use: one of {"HLL\_4", "HLL\_6", "HLL\_8"}.\< [...] -| [hll_sketch_get_estimate_and_bounds](hll_sketch_get_estimate_and_bounds.sqlx) | SCALAR | (sketch BYTES, num_std_devs BYTEINT) -> STRUCT<estimate FLOAT64, lower_bound FLOAT64, upper_bound FLOAT64> | Gets cardinality estimate and bounds from given sketch.\<br\>\<br\>Param sketch: The given sketch to query as BYTES.\<br\>Param num\_std\_devs: The returned bounds will be based on the statistical confidence interval determined by the given number of standard deviations\<br\> from the retur [...] +| [hll_sketch_agg_string](../definitions/hll/hll_sketch_agg_string.sqlx) | AGGREGATE | (str STRING) -> BYTES | Creates a sketch that represents the cardinality of the given STRING column.\<br\>\<br\>Param str: the STRING column of identifiers.\<br\>Defaults: lg\_k = 12, tgt\_type = HLL\_4.\<br\>Returns: an HLL Sketch, as BYTES. | +| [hll_sketch_agg_union](../definitions/hll/hll_sketch_agg_union.sqlx) | AGGREGATE | (sketch BYTES) -> BYTES | Creates a sketch that represents the union of the given column of sketches.\<br\>\<br\>Param sketch: the column of sketches. Each as BYTES.\<br\>Defaults: lg\_k = 12, tgt\_type = HLL\_4.\<br\>Returns: an HLL Sketch, as BYTES. | +| [hll_sketch_agg_int64](../definitions/hll/hll_sketch_agg_int64.sqlx) | AGGREGATE | (value INT64) -> BYTES | Creates a sketch that represents the cardinality of the given INT64 column.\<br\>\<br\>Param value: the INT64 column of identifiers.\<br\>Defaults: lg\_k = 12, tgt\_type = HLL\_4.\<br\>Returns: an HLL Sketch, as BYTES. | +| [hll_sketch_agg_string_lgk_type](../definitions/hll/hll_sketch_agg_string_lgk_type.sqlx) | AGGREGATE | (str STRING, params STRUCT<lg_k BYTEINT, tgt_type STRING> NOT AGGREGATE) -> BYTES | Creates a sketch that represents the cardinality of the given STRING column.\<br\>\<br\>Param str: the STRING column of identifiers.\<br\>Param lg\_k: the sketch accuracy/size parameter as an integer in the range \[4, 21\].\<br\>Param tgt\_type: The HLL type to use: one of {"HLL\_4", "HLL\_6", "HLL\_8" [...] +| [hll_sketch_agg_union_lgk_type](../definitions/hll/hll_sketch_agg_union_lgk_type.sqlx) | AGGREGATE | (sketch BYTES, params STRUCT<lg_k BYTEINT, tgt_type STRING> NOT AGGREGATE) -> BYTES | Creates a sketch that represents the union of the given column of sketches.\<br\>\<br\>Param sketch: the column of sketches. Each as BYTES.\<br\>Param lg\_k: the sketch accuracy/size parameter as an integer in the range \[4, 21\].\<br\>Param tgt\_type: The HLL type to use: one of {"HLL\_4", "HLL\_6", " [...] +| [hll_sketch_agg_int64_lgk_type](../definitions/hll/hll_sketch_agg_int64_lgk_type.sqlx) | AGGREGATE | (value INT64, params STRUCT<lg_k BYTEINT, tgt_type STRING> NOT AGGREGATE) -> BYTES | Creates a sketch that represents the cardinality of the given INT64 column.\<br\>\<br\>Param value: the INT64 column of identifiers.\<br\>Param lg\_k: the sketch accuracy/size parameter as an integer in the range \[4, 21\].\<br\>Param tgt\_type: The HLL type to use: one of {"HLL\_4", "HLL\_6", "HLL\_8"} [...] +| [hll_sketch_get_estimate](../definitions/hll/hll_sketch_get_estimate.sqlx) | SCALAR | (sketch BYTES) -> FLOAT64 | Returns a summary string that represents the state of the given sketch.\<br\>\<br\>Param sketch: the given sketch as BYTES.\<br\>Returns: the cardinality estimate as FLOAT64 value. | +| [hll_sketch_to_string](../definitions/hll/hll_sketch_to_string.sqlx) | SCALAR | (sketch BYTES) -> STRING | Returns a summary string that represents the state of the given sketch.\<br\>\<br\>Param sketch: the given sketch as BYTES.\<br\>Returns: a STRING that represents the state of the given sketch. | +| [hll_sketch_union](../definitions/hll/hll_sketch_union.sqlx) | SCALAR | (sketchA BYTES, sketchB BYTES) -> BYTES | Computes a sketch that represents the union of the two given sketches.\<br\>\<br\>Param sketchA: the first sketch as bytes.\<br\>Param sketchB: the second sketch as bytes.\<br\>Defaults: lg\_k = 12, tgt\_type = HLL\_4.\<br\>Returns: an HLL Sketch, as BYTES. | +| [hll_sketch_union_lgk_type](../definitions/hll/hll_sketch_union_lgk_type.sqlx) | SCALAR | (sketchA BYTES, sketchB BYTES, lg_k BYTEINT, tgt_type STRING) -> BYTES | Computes a sketch that represents the union of the two given sketches.\<br\>\<br\>Param sketchA: the first sketch as bytes.\<br\>Param sketchB: the second sketch as bytes.\<br\>Param lg\_k: the sketch accuracy/size parameter as an integer in the range \[4, 21\].\<br\>Param tgt\_type: The HLL type to use: one of {"HLL\_4", "HL [...] +| [hll_sketch_get_estimate_and_bounds](../definitions/hll/hll_sketch_get_estimate_and_bounds.sqlx) | SCALAR | (sketch BYTES, num_std_devs BYTEINT) -> STRUCT<estimate FLOAT64, lower_bound FLOAT64, upper_bound FLOAT64> | Gets cardinality estimate and bounds from given sketch.\<br\>\<br\>Param sketch: The given sketch to query as BYTES.\<br\>Param num\_std\_devs: The returned bounds will be based on the statistical confidence interval determined by the given number of standard deviations\<b [...] **Examples:** diff --git a/kll/README.md b/kll/README.md index f4df0f0..c0d3262 100644 --- a/kll/README.md +++ b/kll/README.md @@ -37,21 +37,21 @@ page for how to contact us. | Function Name | Function Type | Signature | Description | |---|---|---|---| -| [kll_sketch_float_build](kll_sketch_float_build.sqlx) | AGGREGATE | (value FLOAT64) -> BYTES | Creates a sketch that represents the distribution of the given column.\<br\>\<br\>Param value: the column of FLOAT64 values.\<br\>Defaults: k = 200.\<br\>Returns: a KLL Sketch, as bytes. | -| [kll_sketch_float_merge](kll_sketch_float_merge.sqlx) | AGGREGATE | (sketch BYTES) -> BYTES | Merges sketches from the given column.\<br\>\<br\>Param sketch: the column of values.\<br\>Defaluts: k = 200.\<br\>Returns: a serialized KLL sketch as BYTES. | -| [kll_sketch_float_merge_k](kll_sketch_float_merge_k.sqlx) | AGGREGATE | (sketch BYTES, k INT NOT AGGREGATE) -> BYTES | Merges sketches from the given column.\<br\>\<br\>Param sketch: the column of values.\<br\>Param k: the sketch accuracy/size parameter as an integer in the range \[8, 65535\].\<br\>Returns: a serialized KLL sketch as BYTES. | -| [kll_sketch_float_build_k](kll_sketch_float_build_k.sqlx) | AGGREGATE | (value FLOAT64, k INT NOT AGGREGATE) -> BYTES | Creates a sketch that represents the distribution of the given column.\<br\>\<br\>Param value: the column of FLOAT64 values.\<br\>Param k: the sketch accuracy/size parameter as an INT in the range \[8, 65535\].\<br\>Returns: a KLL Sketch, as bytes. | -| [kll_sketch_float_get_n](kll_sketch_float_get_n.sqlx) | SCALAR | (sketch BYTES) -> INT64 | Returns the length of the input stream.\<br\>\<br\>Param sketch: the given sketch as BYTES.\<br\>Returns: stream length as INT64 | -| [kll_sketch_float_get_min_value](kll_sketch_float_get_min_value.sqlx) | SCALAR | (sketch BYTES) -> FLOAT64 | Returns the minimum value of the input stream.\<br\>\<br\>Param sketch: the given sketch as BYTES.\<br\>Returns: min value as FLOAT64 | -| [kll_sketch_float_to_string](kll_sketch_float_to_string.sqlx) | SCALAR | (sketch BYTES) -> STRING | Returns a summary string that represents the state of the given sketch.\<br\>\<br\>Param sketch: the given sketch as sketch encoded bytes.\<br\>Returns: a string that represents the state of the given sketch. | -| [kll_sketch_float_get_num_retained](kll_sketch_float_get_num_retained.sqlx) | SCALAR | (sketch BYTES) -> INT64 | Returns the number of retained items \(samples\) in the sketch.\<br\>\<br\>Param sketch: the given sketch as BYTES.\<br\>Returns: number of retained items as INT64 | -| [kll_sketch_float_get_max_value](kll_sketch_float_get_max_value.sqlx) | SCALAR | (sketch BYTES) -> FLOAT64 | Returns the maximum value of the input stream.\<br\>\<br\>Param sketch: the given sketch as BYTES.\<br\>Returns: max value as FLOAT64 | -| [kll_sketch_float_get_normalized_rank_error](kll_sketch_float_get_normalized_rank_error.sqlx) | SCALAR | (sketch BYTES, pmf BOOL) -> FLOAT64 | Returns the approximate rank error of the given sketch normalized as a fraction between zero and one.\<br\>Param sketch: the given sketch as BYTES.\<br\>Param pmf: if true, returns the "double\-sided" normalized rank error for the get\_PMF\(\) function.\<br\>Otherwise, it is the "single\-sided" normalized rank error for all the other queries.\<b [...] -| [kll_sketch_float_get_rank](kll_sketch_float_get_rank.sqlx) | SCALAR | (sketch BYTES, value FLOAT64, inclusive BOOL) -> FLOAT64 | Returns an approximation to the normalized rank, on the interval \[0.0, 1.0\], of the given value.\<br\>\<br\>Param sketch: the given sketch in serialized form.\<br\>Param value: value to be ranked.\<br\>Param inclusive: if true the weight of the given value is included into the rank.\<br\>Returns: an approximate rank of the given value. | -| [kll_sketch_float_get_pmf](kll_sketch_float_get_pmf.sqlx) | SCALAR | (sketch BYTES, split_points ARRAY<FLOAT64>, inclusive BOOL) -> ARRAY<FLOAT64> | Returns an approximation to the Probability Mass Function \(PMF\)\<br\>of the input stream as an array of probability masses defined by the given split\_points.\<br\>\<br\>Param sketch: the given sketch as BYTES.\<br\>\<br\>Param split\_points: an array of M unique, monotonically increasing values \<br\> \(of the same type as the input va [...] -| [kll_sketch_float_kolmogorov_smirnov](kll_sketch_float_kolmogorov_smirnov.sqlx) | SCALAR | (sketchA BYTES, sketchB BYTES, pvalue FLOAT64) -> BOOL | Performs the Kolmogorov\-Smirnov Test between two KLL sketches of type FLOAT64.\<br\>If the given sketches have insufficient data or if the sketch sizes are too small, this will return false.\<br\>\<br\>Param sketchA: sketch A in serialized form.\<br\>Param sketchB: sketch B in serialized form.\<br\>Param pvalue: Target p\-value. Typically [...] -| [kll_sketch_float_get_cdf](kll_sketch_float_get_cdf.sqlx) | SCALAR | (sketch BYTES, split_points ARRAY<FLOAT64>, inclusive BOOL) -> ARRAY<FLOAT64> | Returns an approximation to the Cumulative Distribution Function \(CDF\) \<br\>of the input stream as an array of cumulative probabilities defined by the given split\_points.\<br\>\<br\>Param sketch: the given sketch as BYTES.\<br\>\<br\>Param split\_points: an array of M unique, monotonically increasing values\<br\> \(of the same type as [...] -| [kll_sketch_float_get_quantile](kll_sketch_float_get_quantile.sqlx) | SCALAR | (sketch BYTES, rank FLOAT64, inclusive BOOL) -> FLOAT64 | Returns a value from the sketch that is the best approximation to a value from the original stream with the given rank.\<br\>\<br\>Param sketch: the given sketch in serialized form.\<br\>Param rank: rank of a value in the hypothetical sorted stream.\<br\>Param inclusive: if true, the given rank is considered inclusive \(includes weight of a value\)\<b [...] +| [kll_sketch_float_build](../definitions/kll/kll_sketch_float_build.sqlx) | AGGREGATE | (value FLOAT64) -> BYTES | Creates a sketch that represents the distribution of the given column.\<br\>\<br\>Param value: the column of FLOAT64 values.\<br\>Defaults: k = 200.\<br\>Returns: a KLL Sketch, as bytes. | +| [kll_sketch_float_merge](../definitions/kll/kll_sketch_float_merge.sqlx) | AGGREGATE | (sketch BYTES) -> BYTES | Merges sketches from the given column.\<br\>\<br\>Param sketch: the column of values.\<br\>Defaluts: k = 200.\<br\>Returns: a serialized KLL sketch as BYTES. | +| [kll_sketch_float_merge_k](../definitions/kll/kll_sketch_float_merge_k.sqlx) | AGGREGATE | (sketch BYTES, k INT NOT AGGREGATE) -> BYTES | Merges sketches from the given column.\<br\>\<br\>Param sketch: the column of values.\<br\>Param k: the sketch accuracy/size parameter as an integer in the range \[8, 65535\].\<br\>Returns: a serialized KLL sketch as BYTES. | +| [kll_sketch_float_build_k](../definitions/kll/kll_sketch_float_build_k.sqlx) | AGGREGATE | (value FLOAT64, k INT NOT AGGREGATE) -> BYTES | Creates a sketch that represents the distribution of the given column.\<br\>\<br\>Param value: the column of FLOAT64 values.\<br\>Param k: the sketch accuracy/size parameter as an INT in the range \[8, 65535\].\<br\>Returns: a KLL Sketch, as bytes. | +| [kll_sketch_float_get_n](../definitions/kll/kll_sketch_float_get_n.sqlx) | SCALAR | (sketch BYTES) -> INT64 | Returns the length of the input stream.\<br\>\<br\>Param sketch: the given sketch as BYTES.\<br\>Returns: stream length as INT64 | +| [kll_sketch_float_get_min_value](../definitions/kll/kll_sketch_float_get_min_value.sqlx) | SCALAR | (sketch BYTES) -> FLOAT64 | Returns the minimum value of the input stream.\<br\>\<br\>Param sketch: the given sketch as BYTES.\<br\>Returns: min value as FLOAT64 | +| [kll_sketch_float_to_string](../definitions/kll/kll_sketch_float_to_string.sqlx) | SCALAR | (sketch BYTES) -> STRING | Returns a summary string that represents the state of the given sketch.\<br\>\<br\>Param sketch: the given sketch as sketch encoded bytes.\<br\>Returns: a string that represents the state of the given sketch. | +| [kll_sketch_float_get_num_retained](../definitions/kll/kll_sketch_float_get_num_retained.sqlx) | SCALAR | (sketch BYTES) -> INT64 | Returns the number of retained items \(samples\) in the sketch.\<br\>\<br\>Param sketch: the given sketch as BYTES.\<br\>Returns: number of retained items as INT64 | +| [kll_sketch_float_get_max_value](../definitions/kll/kll_sketch_float_get_max_value.sqlx) | SCALAR | (sketch BYTES) -> FLOAT64 | Returns the maximum value of the input stream.\<br\>\<br\>Param sketch: the given sketch as BYTES.\<br\>Returns: max value as FLOAT64 | +| [kll_sketch_float_get_normalized_rank_error](../definitions/kll/kll_sketch_float_get_normalized_rank_error.sqlx) | SCALAR | (sketch BYTES, pmf BOOL) -> FLOAT64 | Returns the approximate rank error of the given sketch normalized as a fraction between zero and one.\<br\>Param sketch: the given sketch as BYTES.\<br\>Param pmf: if true, returns the "double\-sided" normalized rank error for the get\_PMF\(\) function.\<br\>Otherwise, it is the "single\-sided" normalized rank error for all th [...] +| [kll_sketch_float_get_rank](../definitions/kll/kll_sketch_float_get_rank.sqlx) | SCALAR | (sketch BYTES, value FLOAT64, inclusive BOOL) -> FLOAT64 | Returns an approximation to the normalized rank, on the interval \[0.0, 1.0\], of the given value.\<br\>\<br\>Param sketch: the given sketch in serialized form.\<br\>Param value: value to be ranked.\<br\>Param inclusive: if true the weight of the given value is included into the rank.\<br\>Returns: an approximate rank of the given value. | +| [kll_sketch_float_get_pmf](../definitions/kll/kll_sketch_float_get_pmf.sqlx) | SCALAR | (sketch BYTES, split_points ARRAY<FLOAT64>, inclusive BOOL) -> ARRAY<FLOAT64> | Returns an approximation to the Probability Mass Function \(PMF\)\<br\>of the input stream as an array of probability masses defined by the given split\_points.\<br\>\<br\>Param sketch: the given sketch as BYTES.\<br\>\<br\>Param split\_points: an array of M unique, monotonically increasing values \<br\> \(of the same t [...] +| [kll_sketch_float_kolmogorov_smirnov](../definitions/kll/kll_sketch_float_kolmogorov_smirnov.sqlx) | SCALAR | (sketchA BYTES, sketchB BYTES, pvalue FLOAT64) -> BOOL | Performs the Kolmogorov\-Smirnov Test between two KLL sketches of type FLOAT64.\<br\>If the given sketches have insufficient data or if the sketch sizes are too small, this will return false.\<br\>\<br\>Param sketchA: sketch A in serialized form.\<br\>Param sketchB: sketch B in serialized form.\<br\>Param pvalue: Target p [...] +| [kll_sketch_float_get_cdf](../definitions/kll/kll_sketch_float_get_cdf.sqlx) | SCALAR | (sketch BYTES, split_points ARRAY<FLOAT64>, inclusive BOOL) -> ARRAY<FLOAT64> | Returns an approximation to the Cumulative Distribution Function \(CDF\) \<br\>of the input stream as an array of cumulative probabilities defined by the given split\_points.\<br\>\<br\>Param sketch: the given sketch as BYTES.\<br\>\<br\>Param split\_points: an array of M unique, monotonically increasing values\<br\> \( [...] +| [kll_sketch_float_get_quantile](../definitions/kll/kll_sketch_float_get_quantile.sqlx) | SCALAR | (sketch BYTES, rank FLOAT64, inclusive BOOL) -> FLOAT64 | Returns a value from the sketch that is the best approximation to a value from the original stream with the given rank.\<br\>\<br\>Param sketch: the given sketch in serialized form.\<br\>Param rank: rank of a value in the hypothetical sorted stream.\<br\>Param inclusive: if true, the given rank is considered inclusive \(includes wei [...] **Examples:** diff --git a/readme_generator.py b/readme_generator.py index 929c0c7..f294c65 100644 --- a/readme_generator.py +++ b/readme_generator.py @@ -111,14 +111,12 @@ def process_folder(input_folder: str, sketch_type: str) -> dict: parsed_data = parse_sqlx(content, file) logging.info(f"Parsed data for {file}: {parsed_data}") - # Update function index with relative path - relative_path = os.path.relpath(sqlx_path, input_folder) function_index[sketch_type].append({ 'function_name': parsed_data['function_name'], 'signature': parsed_data['signature'], 'function_type':parsed_data['function_type'], 'description': parsed_data['description'], - 'path': relative_path # Store relative path for linking + 'path': sqlx_path }) return function_index @@ -136,7 +134,7 @@ def generate_readme(template_path: str, function_index: dict, examples_path: str # Sort functions by function type (AGGREGATE first, then SCALAR) and then by number of arguments sorted_functions = sorted(function_index, key=lambda x: (x['function_type'], len(x['signature'].split(','))), reverse=False) for function in sorted_functions: - function_link = f"[{function['function_name']}]({function['path']})" + function_link = f"[{function['function_name']}](../{function['path']})" output_lines += f"| {function_link} | {function['function_type']} | {function['signature']} | {function['description']} |\n" # Add examples section diff --git a/tdigest/README.md b/tdigest/README.md index 3d700df..867c852 100644 --- a/tdigest/README.md +++ b/tdigest/README.md @@ -36,16 +36,16 @@ page for how to contact us. | Function Name | Function Type | Signature | Description | |---|---|---|---| -| [tdigest_double_build](tdigest_double_build.sqlx) | AGGREGATE | (value FLOAT64) -> BYTES | Creates a sketch that represents the distribution of the given column.\<br\>\<br\>Param value: the column of FLOAT64 values.\<br\>Defaults: k = 200.\<br\>Returns: a t\-Digest, as bytes. | -| [tdigest_double_merge](tdigest_double_merge.sqlx) | AGGREGATE | (sketch BYTES) -> BYTES | Merges sketches from the given column.\<br\>\<br\>Param sketch: the column of values.\<br\>Defaults: k = 200.\<br\>Returns: a serialized t\-Digest as BYTES. | -| [tdigest_double_merge_k](tdigest_double_merge_k.sqlx) | AGGREGATE | (sketch BYTES, k INT NOT AGGREGATE) -> BYTES | Merges sketches from the given column.\<br\>\<br\>Param sketch: the column of values.\<br\>Param k: the sketch accuracy/size parameter as an integer in the range \[10, 65535\].\<br\>Returns: a serialized t\-Digest as BYTES. | -| [tdigest_double_build_k](tdigest_double_build_k.sqlx) | AGGREGATE | (value FLOAT64, k INT NOT AGGREGATE) -> BYTES | Creates a sketch that represents the distribution of the given column.\<br\>\<br\>Param value: the column of FLOAT64 values.\<br\>Param k: the sketch accuracy/size parameter as an INT in the range \[10, 65535\].\<br\>Returns: a t\-Digest, as bytes. | -| [tdigest_double_get_max_value](tdigest_double_get_max_value.sqlx) | SCALAR | (sketch BYTES) -> FLOAT64 | Returns the maximum value of the input stream.\<br\>\<br\>Param sketch: the given sketch as BYTES.\<br\>Returns: max value as FLOAT64 | -| [tdigest_double_to_string](tdigest_double_to_string.sqlx) | SCALAR | (sketch BYTES) -> STRING | Returns a summary string that represents the state of the given sketch.\<br\>\<br\>Param sketch: the given sketch as sketch encoded bytes.\<br\>Returns: a string that represents the state of the given sketch. | -| [tdigest_double_get_total_weight](tdigest_double_get_total_weight.sqlx) | SCALAR | (sketch BYTES) -> INT64 | Returns the total weight of the input stream.\<br\>\<br\>Param sketch: the given sketch as BYTES.\<br\>Returns: total weight as INT64 | -| [tdigest_double_get_min_value](tdigest_double_get_min_value.sqlx) | SCALAR | (sketch BYTES) -> FLOAT64 | Returns the minimum value of the input stream.\<br\>\<br\>Param sketch: the given sketch as BYTES.\<br\>Returns: min value as FLOAT64 | -| [tdigest_double_get_rank](tdigest_double_get_rank.sqlx) | SCALAR | (sketch BYTES, value FLOAT64) -> FLOAT64 | Returns an approximation to the normalized rank, on the interval \[0.0, 1.0\], of the given value.\<br\>\<br\>Param sketch: the given sketch in serialized form.\<br\>Param value: value to be ranked.\<br\>Returns: an approximate rank of the given value. | -| [tdigest_double_get_quantile](tdigest_double_get_quantile.sqlx) | SCALAR | (sketch BYTES, rank FLOAT64) -> FLOAT64 | Returns a value from the sketch that is the best approximation to a value from the original stream with the given rank.\<br\>\<br\>Param sketch: the given sketch in serialized form.\<br\>Param rank: rank of a value in the hypothetical sorted stream.\<br\>Returns: an approximate quantile associated with the given rank. | +| [tdigest_double_build](../definitions/tdigest/tdigest_double_build.sqlx) | AGGREGATE | (value FLOAT64) -> BYTES | Creates a sketch that represents the distribution of the given column.\<br\>\<br\>Param value: the column of FLOAT64 values.\<br\>Defaults: k = 200.\<br\>Returns: a t\-Digest, as bytes. | +| [tdigest_double_merge](../definitions/tdigest/tdigest_double_merge.sqlx) | AGGREGATE | (sketch BYTES) -> BYTES | Merges sketches from the given column.\<br\>\<br\>Param sketch: the column of values.\<br\>Defaults: k = 200.\<br\>Returns: a serialized t\-Digest as BYTES. | +| [tdigest_double_merge_k](../definitions/tdigest/tdigest_double_merge_k.sqlx) | AGGREGATE | (sketch BYTES, k INT NOT AGGREGATE) -> BYTES | Merges sketches from the given column.\<br\>\<br\>Param sketch: the column of values.\<br\>Param k: the sketch accuracy/size parameter as an integer in the range \[10, 65535\].\<br\>Returns: a serialized t\-Digest as BYTES. | +| [tdigest_double_build_k](../definitions/tdigest/tdigest_double_build_k.sqlx) | AGGREGATE | (value FLOAT64, k INT NOT AGGREGATE) -> BYTES | Creates a sketch that represents the distribution of the given column.\<br\>\<br\>Param value: the column of FLOAT64 values.\<br\>Param k: the sketch accuracy/size parameter as an INT in the range \[10, 65535\].\<br\>Returns: a t\-Digest, as bytes. | +| [tdigest_double_get_max_value](../definitions/tdigest/tdigest_double_get_max_value.sqlx) | SCALAR | (sketch BYTES) -> FLOAT64 | Returns the maximum value of the input stream.\<br\>\<br\>Param sketch: the given sketch as BYTES.\<br\>Returns: max value as FLOAT64 | +| [tdigest_double_to_string](../definitions/tdigest/tdigest_double_to_string.sqlx) | SCALAR | (sketch BYTES) -> STRING | Returns a summary string that represents the state of the given sketch.\<br\>\<br\>Param sketch: the given sketch as sketch encoded bytes.\<br\>Returns: a string that represents the state of the given sketch. | +| [tdigest_double_get_total_weight](../definitions/tdigest/tdigest_double_get_total_weight.sqlx) | SCALAR | (sketch BYTES) -> INT64 | Returns the total weight of the input stream.\<br\>\<br\>Param sketch: the given sketch as BYTES.\<br\>Returns: total weight as INT64 | +| [tdigest_double_get_min_value](../definitions/tdigest/tdigest_double_get_min_value.sqlx) | SCALAR | (sketch BYTES) -> FLOAT64 | Returns the minimum value of the input stream.\<br\>\<br\>Param sketch: the given sketch as BYTES.\<br\>Returns: min value as FLOAT64 | +| [tdigest_double_get_rank](../definitions/tdigest/tdigest_double_get_rank.sqlx) | SCALAR | (sketch BYTES, value FLOAT64) -> FLOAT64 | Returns an approximation to the normalized rank, on the interval \[0.0, 1.0\], of the given value.\<br\>\<br\>Param sketch: the given sketch in serialized form.\<br\>Param value: value to be ranked.\<br\>Returns: an approximate rank of the given value. | +| [tdigest_double_get_quantile](../definitions/tdigest/tdigest_double_get_quantile.sqlx) | SCALAR | (sketch BYTES, rank FLOAT64) -> FLOAT64 | Returns a value from the sketch that is the best approximation to a value from the original stream with the given rank.\<br\>\<br\>Param sketch: the given sketch in serialized form.\<br\>Param rank: rank of a value in the hypothetical sorted stream.\<br\>Returns: an approximate quantile associated with the given rank. | **Examples:** diff --git a/theta/README.md b/theta/README.md index 8c4eb24..f7a6253 100644 --- a/theta/README.md +++ b/theta/README.md @@ -38,30 +38,30 @@ page for how to contact us. | Function Name | Function Type | Signature | Description | |---|---|---|---| -| [theta_sketch_agg_int64](theta_sketch_agg_int64.sqlx) | AGGREGATE | (value INT64) -> BYTES | Creates a sketch that represents the cardinality of the given INT64 column.\<br\> \<br\>Param value: the INT64 column of identifiers.\<br\>Defaults: lg\_k = 12, seed = 9001, p = 1.0.\<br\>Returns: a Compact, Compressed Theta Sketch, as BYTES. | -| [theta_sketch_agg_union](theta_sketch_agg_union.sqlx) | AGGREGATE | (sketch BYTES) -> BYTES | Creates a sketch that represents the union of the given column of sketches.\<br\>\<br\>Param sketch: the column of sketches. Each as BYTES.\<br\>Defaults: lg\_k = 12, seed = 9001.\<br\>Returns: a Compact, Compressed Theta Sketch, as BYTES. | -| [theta_sketch_agg_string](theta_sketch_agg_string.sqlx) | AGGREGATE | (str STRING) -> BYTES | Creates a sketch that represents the cardinality of the given STRING column.\<br\> \<br\>Param str: the STRING column of identifiers.\<br\>Defaults: lg\_k = 12, seed = 9001, p = 1.0.\<br\>Returns: a Compact, Compressed Theta Sketch, as BYTES. | -| [theta_sketch_agg_union_lgk_seed](theta_sketch_agg_union_lgk_seed.sqlx) | AGGREGATE | (sketch BYTES, params STRUCT<lg_k BYTEINT, seed INT64> NOT AGGREGATE) -> BYTES | Creates a sketch that represents the union of the given column of sketches.\<br\>\<br\>Param sketch: the column of sketches. Each as BYTES.\<br\>Param lg\_k: the sketch accuracy/size parameter as a BYTEINT in the range \[4, 26\].\<br\>Param seed: This is used to confirm that the given sketches were configured with the cor [...] -| [theta_sketch_agg_int64_lgk_seed_p](theta_sketch_agg_int64_lgk_seed_p.sqlx) | AGGREGATE | (value INT64, params STRUCT<lg_k BYTEINT, seed INT64, p FLOAT64> NOT AGGREGATE) -> BYTES | Creates a sketch that represents the cardinality of the given INT64 column.\<br\>\<br\>Param value: the INT64 column of identifiers.\<br\>Param lg\_k: the sketch accuracy/size parameter as a BYTEINT in the range \[4, 26\]. A NULL specifies the default of 12.\<br\>Param seed: the seed to be used by the underl [...] -| [theta_sketch_agg_string_lgk_seed_p](theta_sketch_agg_string_lgk_seed_p.sqlx) | AGGREGATE | (str STRING, params STRUCT<lg_k BYTEINT, seed INT64, p FLOAT64> NOT AGGREGATE) -> BYTES | Creates a sketch that represents the cardinality of the given STRING column.\<br\>\<br\>Param str: the STRING column of identifiers.\<br\>Param lg\_k: the sketch accuracy/size parameter as a BYTEINT in the range \[4, 26\]. A NULL specifies the default of 12.\<br\>Param seed: the seed to be used by the under [...] -| [theta_sketch_get_estimate](theta_sketch_get_estimate.sqlx) | SCALAR | (sketch BYTES) -> FLOAT64 | Gets cardinality estimate and bounds from given sketch.\<br\> \<br\>Param sketch: The given sketch to query as BYTES.\<br\>Defaults: seed = 9001.\<br\>Returns: a FLOAT64 value as the cardinality estimate. | -| [theta_sketch_to_string](theta_sketch_to_string.sqlx) | SCALAR | (sketch BYTES) -> STRING | Returns a summary string that represents the state of the given sketch.\<br\>\<br\>Param sketch: the given sketch as BYTES.\<br\>Defaults: seed = 9001.\<br\>Returns: a STRING that represents the state of the given sketch. | -| [theta_sketch_get_num_retained](theta_sketch_get_num_retained.sqlx) | SCALAR | (sketch BYTES) -> INT | Returns the number of retained entries in the given sketch.\<br\> \<br\>Param sketch: The given sketch to query as BYTES.\<br\>Defaults: seed = 9001.\<br\>Returns: number of retained entries as INT. | -| [theta_sketch_get_theta](theta_sketch_get_theta.sqlx) | SCALAR | (sketch BYTES) -> FLOAT64 | Returns theta \(effective sampling rate\) as a fraction from 0 to 1.\<br\> \<br\>Param sketch: The given sketch to query as BYTES.\<br\>Defaults: seed = 9001.\<br\>Returns: theta as FLOAT64. | -| [theta_sketch_get_num_retained_seed](theta_sketch_get_num_retained_seed.sqlx) | SCALAR | (sketch BYTES, seed INT64) -> INT | Returns the number of retained entries in the given sketch.\<br\> \<br\>Param sketch: The given sketch to query as BYTES.\<br\>Param seed: This is used to confirm that the given sketch was configured with the correct seed.\<br\>Returns: number of retained entries as INT. | -| [theta_sketch_get_estimate_seed](theta_sketch_get_estimate_seed.sqlx) | SCALAR | (sketch BYTES, seed INT64) -> FLOAT64 | Gets cardinality estimate and bounds from given sketch.\<br\> \<br\>Param sketch: The given sketch to query as BYTES.\<br\>Param seed: This is used to confirm that the given sketch was configured with the correct seed.\<br\>Returns: a FLOAT64 value as the cardinality estimate. | -| [theta_sketch_to_string_seed](theta_sketch_to_string_seed.sqlx) | SCALAR | (sketch BYTES, seed INT64) -> STRING | Returns a summary string that represents the state of the given sketch.\<br\>\<br\>Param sketch: the given sketch as BYTES.\<br\>Param seed: This is used to confirm that the given sketch was configured with the correct seed.\<br\>Returns: a STRING that represents the state of the given sketch. | -| [theta_sketch_get_theta_seed](theta_sketch_get_theta_seed.sqlx) | SCALAR | (sketch BYTES, seed INT64) -> FLOAT64 | Returns theta \(effective sampling rate\) as a fraction from 0 to 1.\<br\> \<br\>Param sketch: The given sketch to query as BYTES.\<br\>Param seed: This is used to confirm that the given sketch was configured with the correct seed.\<br\>Returns: theta as FLOAT64. | -| [theta_sketch_intersection](theta_sketch_intersection.sqlx) | SCALAR | (sketchA BYTES, sketchB BYTES) -> BYTES | Computes a sketch that represents the scalar intersection of the two given sketches.\<br\>\<br\>Param sketchA: the first sketch as BYTES.\<br\>Param sketchB: the second sketch as BYTES.\<br\>Defaults: seed = 9001.\<br\>Returns: a Compact, Compressed Theta Sketch, as BYTES. | -| [theta_sketch_union](theta_sketch_union.sqlx) | SCALAR | (sketchA BYTES, sketchB BYTES) -> BYTES | Computes a sketch that represents the scalar union of the two given sketches.\<br\>\<br\>Param sketchA: the first sketch as BYTES.\<br\>Param sketchB: the second sketch as BYTES.\<br\>Defaults: lg\_k = 12, seed = 9001.\<br\>Returns: a Compact, Compressed Theta Sketch, as BYTES. | -| [theta_sketch_a_not_b](theta_sketch_a_not_b.sqlx) | SCALAR | (sketchA BYTES, sketchB BYTES) -> BYTES | Computes a sketch that represents the scalar set difference: sketchA and not sketchB.\<br\>\<br\>Param sketchA: the first sketch "A" as bytes.\<br\>Param sketchB: the second sketch "B" as bytes.\<br\>Defaults: seed = 9001.\<br\>Returns: a Compact, Compressed Theta Sketch, as BYTES. | -| [theta_sketch_intersection_seed](theta_sketch_intersection_seed.sqlx) | SCALAR | (sketchA BYTES, sketchB BYTES, seed INT64) -> BYTES | Computes a sketch that represents the scalar intersection of the two given sketches.\<br\>\<br\>Param sketchA: the first sketch as BYTES.\<br\>Param sketchB: the second sketch as BYTES.\<br\>Param seed: This is used to confirm that the given sketches were configured with the correct seed.\<br\>Returns: a Compact, Compressed Theta Sketch, as BYTES. | -| [theta_sketch_a_not_b_seed](theta_sketch_a_not_b_seed.sqlx) | SCALAR | (sketchA BYTES, sketchB BYTES, seed INT64) -> BYTES | Computes a sketch that represents the scalar set difference: sketchA and not sketchB.\<br\>\<br\>Param sketchA: the first sketch "A" as bytes.\<br\>Param sketchB: the second sketch "B" as bytes.\<br\>Param seed: This is used to confirm that the given sketches were configured with the correct seed.\<br\>Returns: a Compact, Compressed Theta Sketch, as BYTES. | -| [theta_sketch_union_lgk_seed](theta_sketch_union_lgk_seed.sqlx) | SCALAR | (sketchA BYTES, sketchB BYTES, lg_k BYTEINT, seed INT64) -> BYTES | Computes a sketch that represents the scalar union of the two given sketches.\<br\>\<br\>Param sketchA: the first sketch as BYTES.\<br\>Param sketchB: the second sketch as BYTES.\<br\>Param lg\_k: the sketch accuracy/size parameter as an integer in the range \[4, 26\].\<br\>Param seed: This is used to confirm that the given sketches were configu [...] -| [theta_sketch_get_estimate_and_bounds](theta_sketch_get_estimate_and_bounds.sqlx) | SCALAR | (sketch BYTES, num_std_devs BYTEINT) -> STRUCT<estimate FLOAT64, lower_bound FLOAT64, upper_bound FLOAT64> | Gets cardinality estimate and bounds from given sketch.\<br\>\<br\>Param sketch: The given sketch to query as BYTES.\<br\>Param num\_std\_devs: The returned bounds will be based on the statistical confidence interval\<br\> determined by the given number of standard deviations from the r [...] -| [theta_sketch_jaccard_similarity](theta_sketch_jaccard_similarity.sqlx) | SCALAR | (sketchA BYTES, sketchB BYTES) -> STRUCT<lower_bound FLOAT64, estimate FLOAT64, upper_bound FLOAT64> | Computes the Jaccard similarity index with upper and lower bounds.\<br\>The Jaccard similarity index J\(A,B\) = \(A ^ B\)/\(A U B\) is used to measure how similar the two sketches are to each other.\<br\>If J = 1.0, the sketches are considered equal. If J = 0, the two sketches are disjoint.\<br\>A Jacca [...] -| [theta_sketch_get_estimate_and_bounds_seed](theta_sketch_get_estimate_and_bounds_seed.sqlx) | SCALAR | (sketch BYTES, num_std_devs BYTEINT, seed INT64) -> STRUCT<estimate FLOAT64, lower_bound FLOAT64, upper_bound FLOAT64> | Gets cardinality estimate and bounds from given sketch.\<br\>\<br\>Param sketch: The given sketch to query as BYTES.\<br\>Param num\_std\_devs: The returned bounds will be based on the statistical confidence interval\<br\> determined by the given number of standard [...] -| [theta_sketch_jaccard_similarity_seed](theta_sketch_jaccard_similarity_seed.sqlx) | SCALAR | (sketchA BYTES, sketchB BYTES, seed INT64) -> STRUCT<lower_bound FLOAT64, estimate FLOAT64, upper_bound FLOAT64> | Computes the Jaccard similarity index with upper and lower bounds.\<br\>The Jaccard similarity index J\(A,B\) = \(A ^ B\)/\(A U B\) is used to measure how similar the two sketches are to each other.\<br\>If J = 1.0, the sketches are considered equal. If J = 0, the two sketches are [...] +| [theta_sketch_agg_int64](../definitions/theta/theta_sketch_agg_int64.sqlx) | AGGREGATE | (value INT64) -> BYTES | Creates a sketch that represents the cardinality of the given INT64 column.\<br\> \<br\>Param value: the INT64 column of identifiers.\<br\>Defaults: lg\_k = 12, seed = 9001, p = 1.0.\<br\>Returns: a Compact, Compressed Theta Sketch, as BYTES. | +| [theta_sketch_agg_union](../definitions/theta/theta_sketch_agg_union.sqlx) | AGGREGATE | (sketch BYTES) -> BYTES | Creates a sketch that represents the union of the given column of sketches.\<br\>\<br\>Param sketch: the column of sketches. Each as BYTES.\<br\>Defaults: lg\_k = 12, seed = 9001.\<br\>Returns: a Compact, Compressed Theta Sketch, as BYTES. | +| [theta_sketch_agg_string](../definitions/theta/theta_sketch_agg_string.sqlx) | AGGREGATE | (str STRING) -> BYTES | Creates a sketch that represents the cardinality of the given STRING column.\<br\> \<br\>Param str: the STRING column of identifiers.\<br\>Defaults: lg\_k = 12, seed = 9001, p = 1.0.\<br\>Returns: a Compact, Compressed Theta Sketch, as BYTES. | +| [theta_sketch_agg_union_lgk_seed](../definitions/theta/theta_sketch_agg_union_lgk_seed.sqlx) | AGGREGATE | (sketch BYTES, params STRUCT<lg_k BYTEINT, seed INT64> NOT AGGREGATE) -> BYTES | Creates a sketch that represents the union of the given column of sketches.\<br\>\<br\>Param sketch: the column of sketches. Each as BYTES.\<br\>Param lg\_k: the sketch accuracy/size parameter as a BYTEINT in the range \[4, 26\].\<br\>Param seed: This is used to confirm that the given sketches were co [...] +| [theta_sketch_agg_int64_lgk_seed_p](../definitions/theta/theta_sketch_agg_int64_lgk_seed_p.sqlx) | AGGREGATE | (value INT64, params STRUCT<lg_k BYTEINT, seed INT64, p FLOAT64> NOT AGGREGATE) -> BYTES | Creates a sketch that represents the cardinality of the given INT64 column.\<br\>\<br\>Param value: the INT64 column of identifiers.\<br\>Param lg\_k: the sketch accuracy/size parameter as a BYTEINT in the range \[4, 26\]. A NULL specifies the default of 12.\<br\>Param seed: the seed to [...] +| [theta_sketch_agg_string_lgk_seed_p](../definitions/theta/theta_sketch_agg_string_lgk_seed_p.sqlx) | AGGREGATE | (str STRING, params STRUCT<lg_k BYTEINT, seed INT64, p FLOAT64> NOT AGGREGATE) -> BYTES | Creates a sketch that represents the cardinality of the given STRING column.\<br\>\<br\>Param str: the STRING column of identifiers.\<br\>Param lg\_k: the sketch accuracy/size parameter as a BYTEINT in the range \[4, 26\]. A NULL specifies the default of 12.\<br\>Param seed: the seed to [...] +| [theta_sketch_get_estimate](../definitions/theta/theta_sketch_get_estimate.sqlx) | SCALAR | (sketch BYTES) -> FLOAT64 | Gets cardinality estimate and bounds from given sketch.\<br\> \<br\>Param sketch: The given sketch to query as BYTES.\<br\>Defaults: seed = 9001.\<br\>Returns: a FLOAT64 value as the cardinality estimate. | +| [theta_sketch_to_string](../definitions/theta/theta_sketch_to_string.sqlx) | SCALAR | (sketch BYTES) -> STRING | Returns a summary string that represents the state of the given sketch.\<br\>\<br\>Param sketch: the given sketch as BYTES.\<br\>Defaults: seed = 9001.\<br\>Returns: a STRING that represents the state of the given sketch. | +| [theta_sketch_get_num_retained](../definitions/theta/theta_sketch_get_num_retained.sqlx) | SCALAR | (sketch BYTES) -> INT | Returns the number of retained entries in the given sketch.\<br\> \<br\>Param sketch: The given sketch to query as BYTES.\<br\>Defaults: seed = 9001.\<br\>Returns: number of retained entries as INT. | +| [theta_sketch_get_theta](../definitions/theta/theta_sketch_get_theta.sqlx) | SCALAR | (sketch BYTES) -> FLOAT64 | Returns theta \(effective sampling rate\) as a fraction from 0 to 1.\<br\> \<br\>Param sketch: The given sketch to query as BYTES.\<br\>Defaults: seed = 9001.\<br\>Returns: theta as FLOAT64. | +| [theta_sketch_get_num_retained_seed](../definitions/theta/theta_sketch_get_num_retained_seed.sqlx) | SCALAR | (sketch BYTES, seed INT64) -> INT | Returns the number of retained entries in the given sketch.\<br\> \<br\>Param sketch: The given sketch to query as BYTES.\<br\>Param seed: This is used to confirm that the given sketch was configured with the correct seed.\<br\>Returns: number of retained entries as INT. | +| [theta_sketch_get_estimate_seed](../definitions/theta/theta_sketch_get_estimate_seed.sqlx) | SCALAR | (sketch BYTES, seed INT64) -> FLOAT64 | Gets cardinality estimate and bounds from given sketch.\<br\> \<br\>Param sketch: The given sketch to query as BYTES.\<br\>Param seed: This is used to confirm that the given sketch was configured with the correct seed.\<br\>Returns: a FLOAT64 value as the cardinality estimate. | +| [theta_sketch_to_string_seed](../definitions/theta/theta_sketch_to_string_seed.sqlx) | SCALAR | (sketch BYTES, seed INT64) -> STRING | Returns a summary string that represents the state of the given sketch.\<br\>\<br\>Param sketch: the given sketch as BYTES.\<br\>Param seed: This is used to confirm that the given sketch was configured with the correct seed.\<br\>Returns: a STRING that represents the state of the given sketch. | +| [theta_sketch_get_theta_seed](../definitions/theta/theta_sketch_get_theta_seed.sqlx) | SCALAR | (sketch BYTES, seed INT64) -> FLOAT64 | Returns theta \(effective sampling rate\) as a fraction from 0 to 1.\<br\> \<br\>Param sketch: The given sketch to query as BYTES.\<br\>Param seed: This is used to confirm that the given sketch was configured with the correct seed.\<br\>Returns: theta as FLOAT64. | +| [theta_sketch_intersection](../definitions/theta/theta_sketch_intersection.sqlx) | SCALAR | (sketchA BYTES, sketchB BYTES) -> BYTES | Computes a sketch that represents the scalar intersection of the two given sketches.\<br\>\<br\>Param sketchA: the first sketch as BYTES.\<br\>Param sketchB: the second sketch as BYTES.\<br\>Defaults: seed = 9001.\<br\>Returns: a Compact, Compressed Theta Sketch, as BYTES. | +| [theta_sketch_union](../definitions/theta/theta_sketch_union.sqlx) | SCALAR | (sketchA BYTES, sketchB BYTES) -> BYTES | Computes a sketch that represents the scalar union of the two given sketches.\<br\>\<br\>Param sketchA: the first sketch as BYTES.\<br\>Param sketchB: the second sketch as BYTES.\<br\>Defaults: lg\_k = 12, seed = 9001.\<br\>Returns: a Compact, Compressed Theta Sketch, as BYTES. | +| [theta_sketch_a_not_b](../definitions/theta/theta_sketch_a_not_b.sqlx) | SCALAR | (sketchA BYTES, sketchB BYTES) -> BYTES | Computes a sketch that represents the scalar set difference: sketchA and not sketchB.\<br\>\<br\>Param sketchA: the first sketch "A" as bytes.\<br\>Param sketchB: the second sketch "B" as bytes.\<br\>Defaults: seed = 9001.\<br\>Returns: a Compact, Compressed Theta Sketch, as BYTES. | +| [theta_sketch_intersection_seed](../definitions/theta/theta_sketch_intersection_seed.sqlx) | SCALAR | (sketchA BYTES, sketchB BYTES, seed INT64) -> BYTES | Computes a sketch that represents the scalar intersection of the two given sketches.\<br\>\<br\>Param sketchA: the first sketch as BYTES.\<br\>Param sketchB: the second sketch as BYTES.\<br\>Param seed: This is used to confirm that the given sketches were configured with the correct seed.\<br\>Returns: a Compact, Compressed Theta Sk [...] +| [theta_sketch_a_not_b_seed](../definitions/theta/theta_sketch_a_not_b_seed.sqlx) | SCALAR | (sketchA BYTES, sketchB BYTES, seed INT64) -> BYTES | Computes a sketch that represents the scalar set difference: sketchA and not sketchB.\<br\>\<br\>Param sketchA: the first sketch "A" as bytes.\<br\>Param sketchB: the second sketch "B" as bytes.\<br\>Param seed: This is used to confirm that the given sketches were configured with the correct seed.\<br\>Returns: a Compact, Compressed Theta Ske [...] +| [theta_sketch_union_lgk_seed](../definitions/theta/theta_sketch_union_lgk_seed.sqlx) | SCALAR | (sketchA BYTES, sketchB BYTES, lg_k BYTEINT, seed INT64) -> BYTES | Computes a sketch that represents the scalar union of the two given sketches.\<br\>\<br\>Param sketchA: the first sketch as BYTES.\<br\>Param sketchB: the second sketch as BYTES.\<br\>Param lg\_k: the sketch accuracy/size parameter as an integer in the range \[4, 26\].\<br\>Param seed: This is used to confirm that the given [...] +| [theta_sketch_get_estimate_and_bounds](../definitions/theta/theta_sketch_get_estimate_and_bounds.sqlx) | SCALAR | (sketch BYTES, num_std_devs BYTEINT) -> STRUCT<estimate FLOAT64, lower_bound FLOAT64, upper_bound FLOAT64> | Gets cardinality estimate and bounds from given sketch.\<br\>\<br\>Param sketch: The given sketch to query as BYTES.\<br\>Param num\_std\_devs: The returned bounds will be based on the statistical confidence interval\<br\> determined by the given number of standard [...] +| [theta_sketch_jaccard_similarity](../definitions/theta/theta_sketch_jaccard_similarity.sqlx) | SCALAR | (sketchA BYTES, sketchB BYTES) -> STRUCT<lower_bound FLOAT64, estimate FLOAT64, upper_bound FLOAT64> | Computes the Jaccard similarity index with upper and lower bounds.\<br\>The Jaccard similarity index J\(A,B\) = \(A ^ B\)/\(A U B\) is used to measure how similar the two sketches are to each other.\<br\>If J = 1.0, the sketches are considered equal. If J = 0, the two sketches are d [...] +| [theta_sketch_get_estimate_and_bounds_seed](../definitions/theta/theta_sketch_get_estimate_and_bounds_seed.sqlx) | SCALAR | (sketch BYTES, num_std_devs BYTEINT, seed INT64) -> STRUCT<estimate FLOAT64, lower_bound FLOAT64, upper_bound FLOAT64> | Gets cardinality estimate and bounds from given sketch.\<br\>\<br\>Param sketch: The given sketch to query as BYTES.\<br\>Param num\_std\_devs: The returned bounds will be based on the statistical confidence interval\<br\> determined by the giv [...] +| [theta_sketch_jaccard_similarity_seed](../definitions/theta/theta_sketch_jaccard_similarity_seed.sqlx) | SCALAR | (sketchA BYTES, sketchB BYTES, seed INT64) -> STRUCT<lower_bound FLOAT64, estimate FLOAT64, upper_bound FLOAT64> | Computes the Jaccard similarity index with upper and lower bounds.\<br\>The Jaccard similarity index J\(A,B\) = \(A ^ B\)/\(A U B\) is used to measure how similar the two sketches are to each other.\<br\>If J = 1.0, the sketches are considered equal. If J = 0, [...] **Examples:** diff --git a/tuple/README.md b/tuple/README.md index 50215eb..ed9078c 100644 --- a/tuple/README.md +++ b/tuple/README.md @@ -38,36 +38,36 @@ page for how to contact us. | Function Name | Function Type | Signature | Description | |---|---|---|---| -| [tuple_sketch_int64_agg_union](tuple_sketch_int64_agg_union.sqlx) | AGGREGATE | (sketch BYTES) -> BYTES | Builds a Tuple Sketch that represents the UNION of the given column of Tuple Sketches.\<br\>Note that cardinality estimation accuracy, plots, and error tables are the same as the Theta Sketch.\<br\>This function only applies to Tuple Sketches with an INT64 summary column.\<br\>\<br\>Param sketch: the given column of Tuple Sketches with an INT64 summary column. This may not be NULL. [...] -| [tuple_sketch_int64_agg_string](tuple_sketch_int64_agg_string.sqlx) | AGGREGATE | (key STRING, value INT64) -> BYTES | Builds a Tuple Sketch from an STRING Key column and an INT64 value column.\<br\>Multiple values for the same key are aggregated using the default mode.\<br\>Note that cardinality estimation accuracy, plots, error tables, and sampling probability p are the same as the Theta Sketch.\<br\>This function only applies to Tuple Sketches with an STRING Key column and an INT64 [...] -| [tuple_sketch_int64_agg_int64](tuple_sketch_int64_agg_int64.sqlx) | AGGREGATE | (key INT64, value INT64) -> BYTES | Builds a Tuple Sketch from an INT64 Key column and an INT64 value column.\<br\>Multiple values for the same key are aggregated using the default mode.\<br\>Note that cardinality estimation accuracy, plots, error tables, and sampling probability p are the same as the Theta Sketch.\<br\>This function only applies to Tuple Sketches with an INT64 Key column and an INT64 summa [...] -| [tuple_sketch_int64_agg_union_lgk_seed_mode](tuple_sketch_int64_agg_union_lgk_seed_mode.sqlx) | AGGREGATE | (sketch BYTES, params STRUCT<lg_k BYTEINT, seed INT64, mode STRING> NOT AGGREGATE) -> BYTES | Builds a Tuple Sketch that represents the UNION of the given column of Tuple Sketches.\<br\>Note that cardinality estimation accuracy, plots, and error tables are the same as the Theta Sketch.\<br\>This function only applies to Tuple Sketches with an INT64 summary column.\<br\>\<br\>Para [...] -| [tuple_sketch_int64_agg_int64_lgk_seed_p_mode](tuple_sketch_int64_agg_int64_lgk_seed_p_mode.sqlx) | AGGREGATE | (key INT64, value INT64, params STRUCT<lg_k BYTEINT, seed INT64, p FLOAT64, mode STRING> NOT AGGREGATE) -> BYTES | Builds a Tuple Sketch from an INT64 Key column and an INT64 value column.\<br\>Multiple values for the same key are aggregated using one of the selectable operations: { SUM, MIN, MAX, ONE \(constant 1\) }.\<br\>Note that cardinality estimation accuracy, plots, er [...] -| [tuple_sketch_int64_agg_string_lgk_seed_p_mode](tuple_sketch_int64_agg_string_lgk_seed_p_mode.sqlx) | AGGREGATE | (key STRING, value INT64, params STRUCT<lg_k BYTEINT, seed INT64, p FLOAT64, mode STRING> NOT AGGREGATE) -> BYTES | Builds a Tuple Sketch from an STRING Key column and an INT64 value column.\<br\>Multiple values for the same key are aggregated using one of the selectable operations: SUM, MIN, MAX, ONE.\<br\>Note that cardinality estimation accuracy, plots, error tables, and [...] -| [tuple_sketch_int64_to_string](tuple_sketch_int64_to_string.sqlx) | SCALAR | (sketch BYTES) -> STRING | Returns a human readable STRING that is a short summary of the state of this sketch.\<br\> Note that cardinality estimation accuracy, plots, and error tables are the same as the Theta Sketch.\<br\> This function only applies to Tuple Sketches with an INT64 summary column.\<br\>\<br\>Param sketch: the sketch to be summarized. This may not be NULL.\<br\>Defaults: seed = 9001.\<br\>Re [...] -| [tuple_sketch_int64_get_estimate](tuple_sketch_int64_get_estimate.sqlx) | SCALAR | (sketch BYTES) -> FLOAT64 | Returns the cardinality estimate of the given Tuple Sketch.\<br\>Note that cardinality estimation accuracy, plots, and error tables are the same as the Theta Sketch.\<br\>This function only applies to Tuple Sketches with an INT64 summary column.\<br\> \<br\>Param sketch: the given Tuple Sketch. This may not be NULL.\<br\>Defaults: seed = 9001.\<br\>Returns: the cardinality es [...] -| [tuple_sketch_int64_get_theta](tuple_sketch_int64_get_theta.sqlx) | SCALAR | (sketch BYTES) -> FLOAT64 | Returns theta \(effective sampling rate\) as a fraction from 0 to 1.\<br\>Note that cardinality estimation accuracy, plots, and error tables are the same as the Theta Sketch.\<br\>This function only applies to Tuple Sketches with an INT64 summary column.\<br\> \<br\>Param sketch: the given Tuple Sketch. This may not be NULL.\<br\>Defaults: seed = 9001.\<br\>Returns: theta as FLOAT64. | -| [tuple_sketch_int64_get_num_retained](tuple_sketch_int64_get_num_retained.sqlx) | SCALAR | (sketch BYTES) -> INT | Returns the number of retained entries in the given sketch.\<br\>Note that cardinality estimation accuracy, plots, and error tables are the same as the Theta Sketch.\<br\>This function only applies to Tuple Sketches with an INT64 summary column.\<br\> \<br\>Param sketch: the given Tuple Sketch. This may not be NULL.\<br\>Defaults: seed = 9001.\<br\>Returns: number of reta [...] -| [tuple_sketch_int64_get_theta_seed](tuple_sketch_int64_get_theta_seed.sqlx) | SCALAR | (sketch BYTES, seed INT64) -> FLOAT64 | Returns theta \(effective sampling rate\) as a fraction from 0 to 1.\<br\>Note that cardinality estimation accuracy, plots, and error tables are the same as the Theta Sketch.\<br\>This function only applies to Tuple Sketches with an INT64 summary column.\<br\> \<br\>Param sketch: the given Tuple Sketch. This may not be NULL.\<br\>Param seed: This is used to co [...] -| [tuple_sketch_int64_get_num_retained_seed](tuple_sketch_int64_get_num_retained_seed.sqlx) | SCALAR | (sketch BYTES, seed INT64) -> INT | Returns the number of retained entries in the given sketch.\<br\>Note that cardinality estimation accuracy, plots, and error tables are the same as the Theta Sketch.\<br\>This function only applies to Tuple Sketches with an INT64 summary column.\<br\> \<br\>Param sketch: the given Tuple Sketch. This may not be NULL.\<br\>Param seed: This is used to c [...] -| [tuple_sketch_int64_to_string_seed](tuple_sketch_int64_to_string_seed.sqlx) | SCALAR | (sketch BYTES, seed INT64) -> STRING | Returns a human readable STRING that is a short summary of the state of this sketch.\<br\> Note that cardinality estimation accuracy, plots, and error tables are the same as the Theta Sketch.\<br\> This function only applies to Tuple Sketches with an INT64 summary column.\<br\>\<br\>Param sketch: the sketch to be summarized. This may not be NULL.\<br\>Param se [...] -| [tuple_sketch_int64_a_not_b](tuple_sketch_int64_a_not_b.sqlx) | SCALAR | (sketchA BYTES, sketchB BYTES) -> BYTES | Computes a sketch that represents the set difference of sketchA and not sketchB.\<br\>Note that cardinality estimation accuracy, plots, and error tables are the same as the Theta Sketch.\<br\>This function only applies to Tuple Sketches with an INT64 summary column. \<br\> \<br\>Param sketchA: the first sketch "A" as BYTES. This may not be NULL.\<br\>Param sketchB: the se [...] -| [tuple_sketch_int64_from_theta_sketch](tuple_sketch_int64_from_theta_sketch.sqlx) | SCALAR | (sketch BYTES, value INT64) -> BYTES | Converts the given Theta Sketch into a Tuple Sketch with a INT64 summary column set to the given INT64 value.\<br\>Note that cardinality estimation accuracy, plots, and error tables are the same as the Theta Sketch.\<br\>\<br\>Param sketch: the given Theta Sketch. This may not be NULL.\<br\>Param value: the given INT64 value. This may not be NULL.\<br\>Def [...] -| [tuple_sketch_int64_get_estimate_seed](tuple_sketch_int64_get_estimate_seed.sqlx) | SCALAR | (sketch BYTES, seed INT64) -> FLOAT64 | Returns the cardinality estimate of the given Tuple Sketch.\<br\>Note that cardinality estimation accuracy, plots, and error tables are the same as the Theta Sketch.\<br\>This function only applies to Tuple Sketches with an INT64 summary column.\<br\> \<br\>Param sketch: the given Tuple Sketch. This may not be NULL.\<br\>Param seed: This is used to confi [...] -| [tuple_sketch_int64_intersection](tuple_sketch_int64_intersection.sqlx) | SCALAR | (sketchA BYTES, sketchB BYTES) -> BYTES | Computes a sketch that represents the scalar intersection of sketchA and sketchB.\<br\>Note that cardinality estimation accuracy, plots, and error tables are the same as the Theta Sketch.\<br\>This function only applies to Tuple Sketches with an INT64 summary column.\<br\>\<br\>Param sketchA: the first sketch "A" as BYTES.\<br\>Param sketchB: the second sketch "B [...] -| [tuple_sketch_int64_union](tuple_sketch_int64_union.sqlx) | SCALAR | (sketchA BYTES, sketchB BYTES) -> BYTES | Computes a Tuple Sketch that represents the UNION of sketchA and sketchB.\<br\>Note that cardinality estimation accuracy, plots, and error tables are the same as the Theta Sketch.\<br\>This function only applies to Tuple Sketches with an INT64 summary column.\<br\>\<br\>Param sketchA: the first sketch "A" as BYTES. This may not be NULL.\<br\>Param sketchB: the second sketch "B [...] -| [tuple_sketch_int64_from_theta_sketch_seed](tuple_sketch_int64_from_theta_sketch_seed.sqlx) | SCALAR | (sketch BYTES, value INT64, seed INT64) -> BYTES | Converts the given Theta Sketch into a Tuple Sketch with a INT64 summary column set to the given INT64 value.\<br\>Note that cardinality estimation accuracy, plots, and error tables are the same as the Theta Sketch.\<br\>\<br\>Param sketch: the given Theta Sketch. This may not be NULL.\<br\>Param value: the given INT64 value. This may [...] -| [tuple_sketch_int64_a_not_b_seed](tuple_sketch_int64_a_not_b_seed.sqlx) | SCALAR | (sketchA BYTES, sketchB BYTES, seed INT64) -> BYTES | Computes a sketch that represents the scalar set difference of sketchA and not sketchB.\<br\>Note that cardinality estimation accuracy, plots, and error tables are the same as the Theta Sketch.\<br\>This function only applies to Tuple Sketches with an INT64 summary column.\<br\>\<br\>Param sketchA: the first sketch "A" as BYTES. This may not be NULL.\ [...] -| [tuple_sketch_int64_filter_low_high](tuple_sketch_int64_filter_low_high.sqlx) | SCALAR | (sketch BYTES, low INT64, high INT64) -> BYTES | Returns a Tuple Sketch computed from the given sketch filtered by the given low and high values. \<br\>This returns a compact tuple sketch that contains the subset of rows of the give sketch where the\<br\>summary column is greater\-than or equal to the given low and less\-than or equal to the given high.\<br\>Note that cardinality estimation accurac [...] -| [tuple_sketch_int64_get_estimate_and_bounds](tuple_sketch_int64_get_estimate_and_bounds.sqlx) | SCALAR | (sketch BYTES, num_std_devs BYTEINT) -> STRUCT<estimate FLOAT64, lower_bound FLOAT64, upper_bound FLOAT64> | Returns the cardinality estimate and bounds from the given Tuple Sketch.\<br\>Note that cardinality estimation accuracy, plots, and error tables are the same as the Theta Sketch.\<br\>This function only applies to Tuple Sketches with an INT64 summary column.\<br\> \<br\>Para [...] -| [tuple_sketch_int64_filter_low_high_seed](tuple_sketch_int64_filter_low_high_seed.sqlx) | SCALAR | (sketch BYTES, low INT64, high INT64, seed INT64) -> BYTES | Returns a Tuple Sketch computed from the given sketch filtered by the given low and high values. \<br\>This returns a compact tuple sketch that contains the subset of rows of the give sketch where the\<br\>summary column is greater\-than or equal to the given low and less\-than or equal to the given high.\<br\>Note that cardinal [...] -| [tuple_sketch_int64_jaccard_similarity](tuple_sketch_int64_jaccard_similarity.sqlx) | SCALAR | (sketchA BYTES, sketchB BYTES) -> STRUCT<lower_bound FLOAT64, estimate FLOAT64, upper_bound FLOAT64> | Computes the Jaccard similarity index with upper and lower bounds.\<br\>The Jaccard similarity index J\(A,B\) = \(A ^ B\)/\(A U B\) is used to measure how similar the two sketches are to each other.\<br\>If J = 1.0, the sketches are considered equal. If J = 0, the two sketches are disjoint.\ [...] -| [tuple_sketch_int64_get_sum_estimate_and_bounds](tuple_sketch_int64_get_sum_estimate_and_bounds.sqlx) | SCALAR | (sketch BYTES, num_std_devs BYTEINT) -> STRUCT<sum_estimate FLOAT64, sum_lower_bound FLOAT64, sum_upper_bound FLOAT64> | Returns the estimate and bounds for the sum of the INT64 summary column\<br\>scaled to the original population from the given Tuple Sketch.\<br\>Note that cardinality estimation accuracy, plots, and error tables are the same as the Theta Sketch.\<br\>This [...] -| [tuple_sketch_int64_intersection_seed_mode](tuple_sketch_int64_intersection_seed_mode.sqlx) | SCALAR | (sketchA BYTES, sketchB BYTES, seed INT64, mode STRING) -> BYTES | Computes a sketch that represents the scalar intersection of sketchA and sketchB.\<br\>Note that cardinality estimation accuracy, plots, and error tables are the same as the Theta Sketch.\<br\>This function only applies to Tuple Sketches with an INT64 summary column.\<br\>\<br\>Param sketchA: the first sketch "A" as BY [...] -| [tuple_sketch_int64_get_sum_estimate_and_bounds_seed](tuple_sketch_int64_get_sum_estimate_and_bounds_seed.sqlx) | SCALAR | (sketch BYTES, num_std_devs BYTEINT, seed INT64) -> STRUCT<sum_estimate FLOAT64, sum_lower_bound FLOAT64, sum_upper_bound FLOAT64> | Returns the estimate and bounds for the sum of the INT64 summary column\<br\>scaled to the original population from the given Tuple Sketch.\<br\>Note that cardinality estimation accuracy, plots, and error tables are the same as the Th [...] -| [tuple_sketch_int64_union_lgk_seed_mode](tuple_sketch_int64_union_lgk_seed_mode.sqlx) | SCALAR | (sketchA BYTES, sketchB BYTES, lg_k BYTEINT, seed INT64, mode STRING) -> BYTES | Computes a Tuple Sketch that represents the UNION of sketchA and sketchB.\<br\>Note that cardinality estimation accuracy, plots, and error tables are the same as the Theta Sketch.\<br\>This function only applies to Tuple Sketches with an INT64 summary column.\<br\>\<br\>Param sketchA: the first sketch "A" as BY [...] -| [tuple_sketch_int64_get_estimate_and_bounds_seed](tuple_sketch_int64_get_estimate_and_bounds_seed.sqlx) | SCALAR | (sketch BYTES, num_std_devs BYTEINT, seed INT64) -> STRUCT<estimate FLOAT64, lower_bound FLOAT64, upper_bound FLOAT64> | Returns the cardinality estimate and bounds from the given Tuple Sketch.\<br\>Note that cardinality estimation accuracy, plots, and error tables are the same as the Theta Sketch.\<br\>This function only applies to Tuple Sketches with an INT64 summary col [...] -| [tuple_sketch_int64_jaccard_similarity_seed](tuple_sketch_int64_jaccard_similarity_seed.sqlx) | SCALAR | (sketchA BYTES, sketchB BYTES, seed INT64) -> STRUCT<lower_bound FLOAT64, estimate FLOAT64, upper_bound FLOAT64> | Computes the Jaccard similarity index with upper and lower bounds.\<br\>The Jaccard similarity index J\(A,B\) = \(A ^ B\)/\(A U B\) is used to measure how similar the two sketches are to each other.\<br\>If J = 1.0, the sketches are considered equal. If J = 0, the two s [...] +| [tuple_sketch_int64_agg_union](../definitions/tuple/tuple_sketch_int64_agg_union.sqlx) | AGGREGATE | (sketch BYTES) -> BYTES | Builds a Tuple Sketch that represents the UNION of the given column of Tuple Sketches.\<br\>Note that cardinality estimation accuracy, plots, and error tables are the same as the Theta Sketch.\<br\>This function only applies to Tuple Sketches with an INT64 summary column.\<br\>\<br\>Param sketch: the given column of Tuple Sketches with an INT64 summary column. [...] +| [tuple_sketch_int64_agg_string](../definitions/tuple/tuple_sketch_int64_agg_string.sqlx) | AGGREGATE | (key STRING, value INT64) -> BYTES | Builds a Tuple Sketch from an STRING Key column and an INT64 value column.\<br\>Multiple values for the same key are aggregated using the default mode.\<br\>Note that cardinality estimation accuracy, plots, error tables, and sampling probability p are the same as the Theta Sketch.\<br\>This function only applies to Tuple Sketches with an STRING Key [...] +| [tuple_sketch_int64_agg_int64](../definitions/tuple/tuple_sketch_int64_agg_int64.sqlx) | AGGREGATE | (key INT64, value INT64) -> BYTES | Builds a Tuple Sketch from an INT64 Key column and an INT64 value column.\<br\>Multiple values for the same key are aggregated using the default mode.\<br\>Note that cardinality estimation accuracy, plots, error tables, and sampling probability p are the same as the Theta Sketch.\<br\>This function only applies to Tuple Sketches with an INT64 Key colu [...] +| [tuple_sketch_int64_agg_union_lgk_seed_mode](../definitions/tuple/tuple_sketch_int64_agg_union_lgk_seed_mode.sqlx) | AGGREGATE | (sketch BYTES, params STRUCT<lg_k BYTEINT, seed INT64, mode STRING> NOT AGGREGATE) -> BYTES | Builds a Tuple Sketch that represents the UNION of the given column of Tuple Sketches.\<br\>Note that cardinality estimation accuracy, plots, and error tables are the same as the Theta Sketch.\<br\>This function only applies to Tuple Sketches with an INT64 summary co [...] +| [tuple_sketch_int64_agg_int64_lgk_seed_p_mode](../definitions/tuple/tuple_sketch_int64_agg_int64_lgk_seed_p_mode.sqlx) | AGGREGATE | (key INT64, value INT64, params STRUCT<lg_k BYTEINT, seed INT64, p FLOAT64, mode STRING> NOT AGGREGATE) -> BYTES | Builds a Tuple Sketch from an INT64 Key column and an INT64 value column.\<br\>Multiple values for the same key are aggregated using one of the selectable operations: { SUM, MIN, MAX, ONE \(constant 1\) }.\<br\>Note that cardinality estimatio [...] +| [tuple_sketch_int64_agg_string_lgk_seed_p_mode](../definitions/tuple/tuple_sketch_int64_agg_string_lgk_seed_p_mode.sqlx) | AGGREGATE | (key STRING, value INT64, params STRUCT<lg_k BYTEINT, seed INT64, p FLOAT64, mode STRING> NOT AGGREGATE) -> BYTES | Builds a Tuple Sketch from an STRING Key column and an INT64 value column.\<br\>Multiple values for the same key are aggregated using one of the selectable operations: SUM, MIN, MAX, ONE.\<br\>Note that cardinality estimation accuracy, plo [...] +| [tuple_sketch_int64_to_string](../definitions/tuple/tuple_sketch_int64_to_string.sqlx) | SCALAR | (sketch BYTES) -> STRING | Returns a human readable STRING that is a short summary of the state of this sketch.\<br\> Note that cardinality estimation accuracy, plots, and error tables are the same as the Theta Sketch.\<br\> This function only applies to Tuple Sketches with an INT64 summary column.\<br\>\<br\>Param sketch: the sketch to be summarized. This may not be NULL.\<br\>Defaults: [...] +| [tuple_sketch_int64_get_estimate](../definitions/tuple/tuple_sketch_int64_get_estimate.sqlx) | SCALAR | (sketch BYTES) -> FLOAT64 | Returns the cardinality estimate of the given Tuple Sketch.\<br\>Note that cardinality estimation accuracy, plots, and error tables are the same as the Theta Sketch.\<br\>This function only applies to Tuple Sketches with an INT64 summary column.\<br\> \<br\>Param sketch: the given Tuple Sketch. This may not be NULL.\<br\>Defaults: seed = 9001.\<br\>Return [...] +| [tuple_sketch_int64_get_theta](../definitions/tuple/tuple_sketch_int64_get_theta.sqlx) | SCALAR | (sketch BYTES) -> FLOAT64 | Returns theta \(effective sampling rate\) as a fraction from 0 to 1.\<br\>Note that cardinality estimation accuracy, plots, and error tables are the same as the Theta Sketch.\<br\>This function only applies to Tuple Sketches with an INT64 summary column.\<br\> \<br\>Param sketch: the given Tuple Sketch. This may not be NULL.\<br\>Defaults: seed = 9001.\<br\>Ret [...] +| [tuple_sketch_int64_get_num_retained](../definitions/tuple/tuple_sketch_int64_get_num_retained.sqlx) | SCALAR | (sketch BYTES) -> INT | Returns the number of retained entries in the given sketch.\<br\>Note that cardinality estimation accuracy, plots, and error tables are the same as the Theta Sketch.\<br\>This function only applies to Tuple Sketches with an INT64 summary column.\<br\> \<br\>Param sketch: the given Tuple Sketch. This may not be NULL.\<br\>Defaults: seed = 9001.\<br\>Re [...] +| [tuple_sketch_int64_get_theta_seed](../definitions/tuple/tuple_sketch_int64_get_theta_seed.sqlx) | SCALAR | (sketch BYTES, seed INT64) -> FLOAT64 | Returns theta \(effective sampling rate\) as a fraction from 0 to 1.\<br\>Note that cardinality estimation accuracy, plots, and error tables are the same as the Theta Sketch.\<br\>This function only applies to Tuple Sketches with an INT64 summary column.\<br\> \<br\>Param sketch: the given Tuple Sketch. This may not be NULL.\<br\>Param see [...] +| [tuple_sketch_int64_get_num_retained_seed](../definitions/tuple/tuple_sketch_int64_get_num_retained_seed.sqlx) | SCALAR | (sketch BYTES, seed INT64) -> INT | Returns the number of retained entries in the given sketch.\<br\>Note that cardinality estimation accuracy, plots, and error tables are the same as the Theta Sketch.\<br\>This function only applies to Tuple Sketches with an INT64 summary column.\<br\> \<br\>Param sketch: the given Tuple Sketch. This may not be NULL.\<br\>Param se [...] +| [tuple_sketch_int64_to_string_seed](../definitions/tuple/tuple_sketch_int64_to_string_seed.sqlx) | SCALAR | (sketch BYTES, seed INT64) -> STRING | Returns a human readable STRING that is a short summary of the state of this sketch.\<br\> Note that cardinality estimation accuracy, plots, and error tables are the same as the Theta Sketch.\<br\> This function only applies to Tuple Sketches with an INT64 summary column.\<br\>\<br\>Param sketch: the sketch to be summarized. This may not b [...] +| [tuple_sketch_int64_a_not_b](../definitions/tuple/tuple_sketch_int64_a_not_b.sqlx) | SCALAR | (sketchA BYTES, sketchB BYTES) -> BYTES | Computes a sketch that represents the set difference of sketchA and not sketchB.\<br\>Note that cardinality estimation accuracy, plots, and error tables are the same as the Theta Sketch.\<br\>This function only applies to Tuple Sketches with an INT64 summary column. \<br\> \<br\>Param sketchA: the first sketch "A" as BYTES. This may not be NULL.\<br\> [...] +| [tuple_sketch_int64_from_theta_sketch](../definitions/tuple/tuple_sketch_int64_from_theta_sketch.sqlx) | SCALAR | (sketch BYTES, value INT64) -> BYTES | Converts the given Theta Sketch into a Tuple Sketch with a INT64 summary column set to the given INT64 value.\<br\>Note that cardinality estimation accuracy, plots, and error tables are the same as the Theta Sketch.\<br\>\<br\>Param sketch: the given Theta Sketch. This may not be NULL.\<br\>Param value: the given INT64 value. This may [...] +| [tuple_sketch_int64_get_estimate_seed](../definitions/tuple/tuple_sketch_int64_get_estimate_seed.sqlx) | SCALAR | (sketch BYTES, seed INT64) -> FLOAT64 | Returns the cardinality estimate of the given Tuple Sketch.\<br\>Note that cardinality estimation accuracy, plots, and error tables are the same as the Theta Sketch.\<br\>This function only applies to Tuple Sketches with an INT64 summary column.\<br\> \<br\>Param sketch: the given Tuple Sketch. This may not be NULL.\<br\>Param seed: [...] +| [tuple_sketch_int64_intersection](../definitions/tuple/tuple_sketch_int64_intersection.sqlx) | SCALAR | (sketchA BYTES, sketchB BYTES) -> BYTES | Computes a sketch that represents the scalar intersection of sketchA and sketchB.\<br\>Note that cardinality estimation accuracy, plots, and error tables are the same as the Theta Sketch.\<br\>This function only applies to Tuple Sketches with an INT64 summary column.\<br\>\<br\>Param sketchA: the first sketch "A" as BYTES.\<br\>Param sketchB: [...] +| [tuple_sketch_int64_union](../definitions/tuple/tuple_sketch_int64_union.sqlx) | SCALAR | (sketchA BYTES, sketchB BYTES) -> BYTES | Computes a Tuple Sketch that represents the UNION of sketchA and sketchB.\<br\>Note that cardinality estimation accuracy, plots, and error tables are the same as the Theta Sketch.\<br\>This function only applies to Tuple Sketches with an INT64 summary column.\<br\>\<br\>Param sketchA: the first sketch "A" as BYTES. This may not be NULL.\<br\>Param sketchB: [...] +| [tuple_sketch_int64_from_theta_sketch_seed](../definitions/tuple/tuple_sketch_int64_from_theta_sketch_seed.sqlx) | SCALAR | (sketch BYTES, value INT64, seed INT64) -> BYTES | Converts the given Theta Sketch into a Tuple Sketch with a INT64 summary column set to the given INT64 value.\<br\>Note that cardinality estimation accuracy, plots, and error tables are the same as the Theta Sketch.\<br\>\<br\>Param sketch: the given Theta Sketch. This may not be NULL.\<br\>Param value: the given [...] +| [tuple_sketch_int64_a_not_b_seed](../definitions/tuple/tuple_sketch_int64_a_not_b_seed.sqlx) | SCALAR | (sketchA BYTES, sketchB BYTES, seed INT64) -> BYTES | Computes a sketch that represents the scalar set difference of sketchA and not sketchB.\<br\>Note that cardinality estimation accuracy, plots, and error tables are the same as the Theta Sketch.\<br\>This function only applies to Tuple Sketches with an INT64 summary column.\<br\>\<br\>Param sketchA: the first sketch "A" as BYTES. T [...] +| [tuple_sketch_int64_filter_low_high](../definitions/tuple/tuple_sketch_int64_filter_low_high.sqlx) | SCALAR | (sketch BYTES, low INT64, high INT64) -> BYTES | Returns a Tuple Sketch computed from the given sketch filtered by the given low and high values. \<br\>This returns a compact tuple sketch that contains the subset of rows of the give sketch where the\<br\>summary column is greater\-than or equal to the given low and less\-than or equal to the given high.\<br\>Note that cardinali [...] +| [tuple_sketch_int64_get_estimate_and_bounds](../definitions/tuple/tuple_sketch_int64_get_estimate_and_bounds.sqlx) | SCALAR | (sketch BYTES, num_std_devs BYTEINT) -> STRUCT<estimate FLOAT64, lower_bound FLOAT64, upper_bound FLOAT64> | Returns the cardinality estimate and bounds from the given Tuple Sketch.\<br\>Note that cardinality estimation accuracy, plots, and error tables are the same as the Theta Sketch.\<br\>This function only applies to Tuple Sketches with an INT64 summary colu [...] +| [tuple_sketch_int64_filter_low_high_seed](../definitions/tuple/tuple_sketch_int64_filter_low_high_seed.sqlx) | SCALAR | (sketch BYTES, low INT64, high INT64, seed INT64) -> BYTES | Returns a Tuple Sketch computed from the given sketch filtered by the given low and high values. \<br\>This returns a compact tuple sketch that contains the subset of rows of the give sketch where the\<br\>summary column is greater\-than or equal to the given low and less\-than or equal to the given high.\<b [...] +| [tuple_sketch_int64_jaccard_similarity](../definitions/tuple/tuple_sketch_int64_jaccard_similarity.sqlx) | SCALAR | (sketchA BYTES, sketchB BYTES) -> STRUCT<lower_bound FLOAT64, estimate FLOAT64, upper_bound FLOAT64> | Computes the Jaccard similarity index with upper and lower bounds.\<br\>The Jaccard similarity index J\(A,B\) = \(A ^ B\)/\(A U B\) is used to measure how similar the two sketches are to each other.\<br\>If J = 1.0, the sketches are considered equal. If J = 0, the two sk [...] +| [tuple_sketch_int64_get_sum_estimate_and_bounds](../definitions/tuple/tuple_sketch_int64_get_sum_estimate_and_bounds.sqlx) | SCALAR | (sketch BYTES, num_std_devs BYTEINT) -> STRUCT<sum_estimate FLOAT64, sum_lower_bound FLOAT64, sum_upper_bound FLOAT64> | Returns the estimate and bounds for the sum of the INT64 summary column\<br\>scaled to the original population from the given Tuple Sketch.\<br\>Note that cardinality estimation accuracy, plots, and error tables are the same as the The [...] +| [tuple_sketch_int64_intersection_seed_mode](../definitions/tuple/tuple_sketch_int64_intersection_seed_mode.sqlx) | SCALAR | (sketchA BYTES, sketchB BYTES, seed INT64, mode STRING) -> BYTES | Computes a sketch that represents the scalar intersection of sketchA and sketchB.\<br\>Note that cardinality estimation accuracy, plots, and error tables are the same as the Theta Sketch.\<br\>This function only applies to Tuple Sketches with an INT64 summary column.\<br\>\<br\>Param sketchA: the f [...] +| [tuple_sketch_int64_get_sum_estimate_and_bounds_seed](../definitions/tuple/tuple_sketch_int64_get_sum_estimate_and_bounds_seed.sqlx) | SCALAR | (sketch BYTES, num_std_devs BYTEINT, seed INT64) -> STRUCT<sum_estimate FLOAT64, sum_lower_bound FLOAT64, sum_upper_bound FLOAT64> | Returns the estimate and bounds for the sum of the INT64 summary column\<br\>scaled to the original population from the given Tuple Sketch.\<br\>Note that cardinality estimation accuracy, plots, and error tables a [...] +| [tuple_sketch_int64_union_lgk_seed_mode](../definitions/tuple/tuple_sketch_int64_union_lgk_seed_mode.sqlx) | SCALAR | (sketchA BYTES, sketchB BYTES, lg_k BYTEINT, seed INT64, mode STRING) -> BYTES | Computes a Tuple Sketch that represents the UNION of sketchA and sketchB.\<br\>Note that cardinality estimation accuracy, plots, and error tables are the same as the Theta Sketch.\<br\>This function only applies to Tuple Sketches with an INT64 summary column.\<br\>\<br\>Param sketchA: the f [...] +| [tuple_sketch_int64_get_estimate_and_bounds_seed](../definitions/tuple/tuple_sketch_int64_get_estimate_and_bounds_seed.sqlx) | SCALAR | (sketch BYTES, num_std_devs BYTEINT, seed INT64) -> STRUCT<estimate FLOAT64, lower_bound FLOAT64, upper_bound FLOAT64> | Returns the cardinality estimate and bounds from the given Tuple Sketch.\<br\>Note that cardinality estimation accuracy, plots, and error tables are the same as the Theta Sketch.\<br\>This function only applies to Tuple Sketches with [...] +| [tuple_sketch_int64_jaccard_similarity_seed](../definitions/tuple/tuple_sketch_int64_jaccard_similarity_seed.sqlx) | SCALAR | (sketchA BYTES, sketchB BYTES, seed INT64) -> STRUCT<lower_bound FLOAT64, estimate FLOAT64, upper_bound FLOAT64> | Computes the Jaccard similarity index with upper and lower bounds.\<br\>The Jaccard similarity index J\(A,B\) = \(A ^ B\)/\(A U B\) is used to measure how similar the two sketches are to each other.\<br\>If J = 1.0, the sketches are considered equal [...] **Examples:** --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
