You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "vtlim (via GitHub)" <gi...@apache.org> on 2025/01/31 00:09:51 UTC
Re: [PR] [Docs] Move T-Digest function docs (druid)
vtlim commented on code in PR #17685:
URL: https://github.com/apache/druid/pull/17685#discussion_r1936485101
##########
docs/development/extensions-contrib/tdigestsketch-quantiles.md:
##########
@@ -149,3 +149,27 @@ Similar to quantilesFromTDigestSketch except it takes in a single fraction for c
|name|A String for the output (result) name of the calculation.|yes|
|field|A field reference pointing to the field aggregated/combined T-Digest sketch.|yes|
|fraction|Decimal value between 0 and 1|yes|
+
+### SQL functions
+
+Once you load the T-Digest extension, you can use the following SQL functions.
+
+#### TDIGEST_GENERATE_SKETCH
+
+Builds a T-Digest sketch on values produced by an expression.
+Compression parameter (default value 100) determines the accuracy and size of the sketch.
+Higher compression provides higher accuracy but requires more storage space.
+
+* **Syntax**: `TDIGEST_GENERATE_SKETCH(expr, [compression])`
+* **Default**: Empty Base64-encoded T-Digest sketch string
+* **Function type**: [Aggregation](sql-aggregations.md)
+
+#### TDIGEST_QUANTILE
+
+Builds a T-Digest sketch on values produced by an expression and returns the value for the quantile.
+Compression parameter (default value 100) determines the accuracy and size of the sketch.
+Higher compression provides higher accuracy but requires more storage space.
+
+* **Syntax**: `TDIGEST_QUANTILE(expr, quantileFraction, [compression])`
+* **Default**: `Double.NaN`
+* **Function type**: [Aggregation](sql-aggregations.md)
Review Comment:
```suggestion
* **Function type**: [Aggregation](../../querying/sql-aggregations.md)
#### TDIGEST_QUANTILE
Builds a T-Digest sketch on values produced by an expression and returns the value for the quantile.
Compression parameter (default value 100) determines the accuracy and size of the sketch.
Higher compression provides higher accuracy but requires more storage space.
* **Syntax**: `TDIGEST_QUANTILE(expr, quantileFraction, [compression])`
* **Default**: `Double.NaN`
* **Function type**: [Aggregation](../../querying/sql-aggregations.md)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org