By utilizing the Apache DataSketches library this extension can efficiently compute approximate distinct item counts and estimations of quantiles, while allowing the sketches to be serialized.
Maintainer(s):
rustyconover
Installing and Loading
INSTALL datasketches FROM community;
LOAD datasketches;
About datasketches
For more information regarding usage, see the documentation.
Added Functions
function_name | function_type | description | comment | examples |
---|---|---|---|---|
datasketch_cpc | aggregate | NULL | NULL | NULL |
datasketch_cpc_describe | scalar | NULL | NULL | NULL |
datasketch_cpc_estimate | scalar | NULL | NULL | NULL |
datasketch_cpc_is_empty | scalar | NULL | NULL | NULL |
datasketch_cpc_lower_bound | scalar | NULL | NULL | NULL |
datasketch_cpc_union | aggregate | NULL | NULL | NULL |
datasketch_cpc_upper_bound | scalar | NULL | NULL | NULL |
datasketch_hll | aggregate | NULL | NULL | NULL |
datasketch_hll_describe | scalar | NULL | NULL | NULL |
datasketch_hll_estimate | scalar | NULL | NULL | NULL |
datasketch_hll_is_compact | scalar | NULL | NULL | NULL |
datasketch_hll_is_empty | scalar | NULL | NULL | NULL |
datasketch_hll_lg_config_k | scalar | NULL | NULL | NULL |
datasketch_hll_lower_bound | scalar | NULL | NULL | NULL |
datasketch_hll_union | aggregate | NULL | NULL | NULL |
datasketch_hll_upper_bound | scalar | NULL | NULL | NULL |
datasketch_kll | aggregate | NULL | NULL | NULL |
datasketch_kll_cdf | scalar | NULL | NULL | NULL |
datasketch_kll_describe | scalar | NULL | NULL | NULL |
datasketch_kll_is_empty | scalar | NULL | NULL | NULL |
datasketch_kll_is_estimation_mode | scalar | NULL | NULL | NULL |
datasketch_kll_k | scalar | NULL | NULL | NULL |
datasketch_kll_max_item | scalar | NULL | NULL | NULL |
datasketch_kll_min_item | scalar | NULL | NULL | NULL |
datasketch_kll_n | scalar | NULL | NULL | NULL |
datasketch_kll_normalized_rank_error | scalar | NULL | NULL | NULL |
datasketch_kll_num_retained | scalar | NULL | NULL | NULL |
datasketch_kll_pmf | scalar | NULL | NULL | NULL |
datasketch_kll_quantile | scalar | NULL | NULL | NULL |
datasketch_kll_rank | scalar | NULL | NULL | NULL |
datasketch_quantiles | aggregate | NULL | NULL | NULL |
datasketch_quantiles_cdf | scalar | NULL | NULL | NULL |
datasketch_quantiles_describe | scalar | NULL | NULL | NULL |
datasketch_quantiles_is_empty | scalar | NULL | NULL | NULL |
datasketch_quantiles_is_estimation_mode | scalar | NULL | NULL | NULL |
datasketch_quantiles_k | scalar | NULL | NULL | NULL |
datasketch_quantiles_max_item | scalar | NULL | NULL | NULL |
datasketch_quantiles_min_item | scalar | NULL | NULL | NULL |
datasketch_quantiles_n | scalar | NULL | NULL | NULL |
datasketch_quantiles_normalized_rank_error | scalar | NULL | NULL | NULL |
datasketch_quantiles_num_retained | scalar | NULL | NULL | NULL |
datasketch_quantiles_pmf | scalar | NULL | NULL | NULL |
datasketch_quantiles_quantile | scalar | NULL | NULL | NULL |
datasketch_quantiles_rank | scalar | NULL | NULL | NULL |
datasketch_req | aggregate | NULL | NULL | NULL |
datasketch_req_cdf | scalar | NULL | NULL | NULL |
datasketch_req_describe | scalar | NULL | NULL | NULL |
datasketch_req_is_empty | scalar | NULL | NULL | NULL |
datasketch_req_is_estimation_mode | scalar | NULL | NULL | NULL |
datasketch_req_k | scalar | NULL | NULL | NULL |
datasketch_req_max_item | scalar | NULL | NULL | NULL |
datasketch_req_min_item | scalar | NULL | NULL | NULL |
datasketch_req_n | scalar | NULL | NULL | NULL |
datasketch_req_num_retained | scalar | NULL | NULL | NULL |
datasketch_req_pmf | scalar | NULL | NULL | NULL |
datasketch_req_quantile | scalar | NULL | NULL | NULL |
datasketch_req_rank | scalar | NULL | NULL | NULL |
datasketch_tdigest | aggregate | NULL | NULL | NULL |
datasketch_tdigest_cdf | scalar | NULL | NULL | NULL |
datasketch_tdigest_describe | scalar | NULL | NULL | NULL |
datasketch_tdigest_is_empty | scalar | NULL | NULL | NULL |
datasketch_tdigest_k | scalar | NULL | NULL | NULL |
datasketch_tdigest_pmf | scalar | NULL | NULL | NULL |
datasketch_tdigest_quantile | scalar | NULL | NULL | NULL |
datasketch_tdigest_rank | scalar | NULL | NULL | NULL |
datasketch_tdigest_total_weight | scalar | NULL | NULL | NULL |
Added Types
type_name | type_size | logical_type | type_category | internal |
---|---|---|---|---|
sketch_cpc | 16 | BLOB | NULL | true |
sketch_hll | 16 | BLOB | NULL | true |
sketch_kll_bigint | 16 | BLOB | NULL | true |
sketch_kll_double | 16 | BLOB | NULL | true |
sketch_kll_float | 16 | BLOB | NULL | true |
sketch_kll_integer | 16 | BLOB | NULL | true |
sketch_kll_smallint | 16 | BLOB | NULL | true |
sketch_kll_tinyint | 16 | BLOB | NULL | true |
sketch_kll_ubigint | 16 | BLOB | NULL | true |
sketch_kll_uinteger | 16 | BLOB | NULL | true |
sketch_kll_usmallint | 16 | BLOB | NULL | true |
sketch_kll_utinyint | 16 | BLOB | NULL | true |
sketch_quantiles_bigint | 16 | BLOB | NULL | true |
sketch_quantiles_double | 16 | BLOB | NULL | true |
sketch_quantiles_float | 16 | BLOB | NULL | true |
sketch_quantiles_integer | 16 | BLOB | NULL | true |
sketch_quantiles_smallint | 16 | BLOB | NULL | true |
sketch_quantiles_tinyint | 16 | BLOB | NULL | true |
sketch_quantiles_ubigint | 16 | BLOB | NULL | true |
sketch_quantiles_uinteger | 16 | BLOB | NULL | true |
sketch_quantiles_usmallint | 16 | BLOB | NULL | true |
sketch_quantiles_utinyint | 16 | BLOB | NULL | true |
sketch_req_bigint | 16 | BLOB | NULL | true |
sketch_req_double | 16 | BLOB | NULL | true |
sketch_req_float | 16 | BLOB | NULL | true |
sketch_req_integer | 16 | BLOB | NULL | true |
sketch_req_smallint | 16 | BLOB | NULL | true |
sketch_req_tinyint | 16 | BLOB | NULL | true |
sketch_req_ubigint | 16 | BLOB | NULL | true |
sketch_req_uinteger | 16 | BLOB | NULL | true |
sketch_req_usmallint | 16 | BLOB | NULL | true |
sketch_req_utinyint | 16 | BLOB | NULL | true |
sketch_tdigest_double | 16 | BLOB | NULL | true |
sketch_tdigest_float | 16 | BLOB | NULL | true |
Added Settings
name | description | input_type | scope | aliases |
---|---|---|---|---|
auto_fallback_to_full_download | Allows automatically falling back to full file downloads when possible. | BOOLEAN | GLOBAL | [] |
ca_cert_file | Path to a custom certificate file for self-signed certificates. | VARCHAR | GLOBAL | [] |
enable_curl_server_cert_verification | Enable server side certificate verification for CURL backend. | BOOLEAN | GLOBAL | [] |
enable_server_cert_verification | Enable server side certificate verification. | BOOLEAN | GLOBAL | [] |
force_download | Forces upfront download of file | BOOLEAN | GLOBAL | [] |
hf_max_per_page | Debug option to limit number of items returned in list requests | UBIGINT | GLOBAL | [] |
http_keep_alive | Keep alive connections. Setting this to false can help when running into connection failures | BOOLEAN | GLOBAL | [] |
http_retries | HTTP retries on I/O error | UBIGINT | GLOBAL | [] |
http_retry_backoff | Backoff factor for exponentially increasing retry wait time | FLOAT | GLOBAL | [] |
http_retry_wait_ms | Time between retries | UBIGINT | GLOBAL | [] |
http_timeout | HTTP timeout read/write/connection/retry (in seconds) | UBIGINT | GLOBAL | [] |
httpfs_client_implementation | Select which is the HTTPUtil implementation to be used | VARCHAR | GLOBAL | [] |
s3_access_key_id | S3 Access Key ID | VARCHAR | GLOBAL | [] |
s3_endpoint | S3 Endpoint | VARCHAR | GLOBAL | [] |
s3_kms_key_id | S3 KMS Key ID | VARCHAR | GLOBAL | [] |
s3_region | S3 Region | VARCHAR | GLOBAL | [] |
s3_requester_pays | S3 use requester pays mode | BOOLEAN | GLOBAL | [] |
s3_secret_access_key | S3 Access Key | VARCHAR | GLOBAL | [] |
s3_session_token | S3 Session Token | VARCHAR | GLOBAL | [] |
s3_uploader_max_filesize | S3 Uploader max filesize (between 50GB and 5TB) | VARCHAR | GLOBAL | [] |
s3_uploader_max_parts_per_file | S3 Uploader max parts per file (between 1 and 10000) | UBIGINT | GLOBAL | [] |
s3_uploader_thread_limit | S3 Uploader global thread limit | UBIGINT | GLOBAL | [] |
s3_url_compatibility_mode | Disable Globs and Query Parameters on S3 URLs | BOOLEAN | GLOBAL | [] |
s3_url_style | S3 URL style | VARCHAR | GLOBAL | [] |
s3_use_ssl | S3 use SSL | BOOLEAN | GLOBAL | [] |
unsafe_disable_etag_checks | Disable checks on ETag consistency | BOOLEAN | GLOBAL | [] |