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

suneet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git


The following commit(s) were added to refs/heads/master by this push:
     new 4e5f9cd  Add pushes to DataSketches in SQL docs. (#11578)
4e5f9cd is described below

commit 4e5f9cdacf43248abdb2d1b632e30b3962957b72
Author: Gian Merlino <[email protected]>
AuthorDate: Mon Aug 16 10:38:56 2021 -0700

    Add pushes to DataSketches in SQL docs. (#11578)
    
    * Add pushes to DataSketches in SQL docs.
    
    These notices were already in the native docs, but they were missing
    from the SQL docs.
    
    * Grammar fix.
---
 docs/querying/sql.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/docs/querying/sql.md b/docs/querying/sql.md
index 50706b3..371832c 100644
--- a/docs/querying/sql.md
+++ b/docs/querying/sql.md
@@ -333,12 +333,12 @@ Only the COUNT, ARRAY_AGG, and STRING_AGG aggregations 
can accept the DISTINCT k
 |`MIN(expr)`|Takes the minimum of numbers.|`null` if 
`druid.generic.useDefaultValueForNull=false`, otherwise `9223372036854775807` 
(maximum LONG value)|
 |`MAX(expr)`|Takes the maximum of numbers.|`null` if 
`druid.generic.useDefaultValueForNull=false`, otherwise `-9223372036854775808` 
(minimum LONG value)|
 |`AVG(expr)`|Averages numbers.|`null` if 
`druid.generic.useDefaultValueForNull=false`, otherwise `0`|
-|`APPROX_COUNT_DISTINCT(expr)`|Counts distinct values of expr, which can be a 
regular column or a hyperUnique column. This is always approximate, regardless 
of the value of "useApproximateCountDistinct". This uses Druid's built-in 
"cardinality" or "hyperUnique" aggregators. See also `COUNT(DISTINCT 
expr)`.|`0`|
+|`APPROX_COUNT_DISTINCT(expr)`|_Usage note:_ consider using 
`APPROX_COUNT_DISTINCT_DS_HLL` instead, which offers better accuracy in many 
cases.<br/><br/>Counts distinct values of expr, which can be a regular column 
or a hyperUnique column. This is always approximate, regardless of the value of 
"useApproximateCountDistinct". This uses Druid's built-in "cardinality" or 
"hyperUnique" aggregators. See also `COUNT(DISTINCT expr)`.|`0`|
 |`APPROX_COUNT_DISTINCT_DS_HLL(expr, [lgK, tgtHllType])`|Counts distinct 
values of `expr`, which can be a regular column or an [HLL 
sketch](../development/extensions-core/datasketches-hll.md) column. Results are 
always approximate, regardless of the value of 
[`useApproximateCountDistinct`](../querying/sql.html#connection-context). The 
`lgK` and `tgtHllType` parameters here are, like the equivalents in the 
[aggregator](../development/extensions-core/datasketches-hll.html#aggregators), 
des [...]
 |`APPROX_COUNT_DISTINCT_DS_THETA(expr, [size])`|Counts distinct values of 
expr, which can be a regular column or a [Theta 
sketch](../development/extensions-core/datasketches-theta.md) column. This is 
always approximate, regardless of the value of 
[`useApproximateCountDistinct`](../querying/sql.html#connection-context).  The 
`size` parameter is described in the Theta sketch documentation. The 
[DataSketches 
extension](../development/extensions-core/datasketches-extension.md) must be 
loaded [...]
 |`DS_HLL(expr, [lgK, tgtHllType])`|Creates an [HLL 
sketch](../development/extensions-core/datasketches-hll.md) on the values of 
expr, which can be a regular column or a column containing HLL sketches. The 
`lgK` and `tgtHllType` parameters are described in the HLL sketch 
documentation. The [DataSketches 
extension](../development/extensions-core/datasketches-extension.md) must be 
loaded to use this function.|`'0'` (STRING)|
 |`DS_THETA(expr, [size])`|Creates a [Theta 
sketch](../development/extensions-core/datasketches-theta.md) on the values of 
expr, which can be a regular column or a column containing Theta sketches. The 
`size` parameter is described in the Theta sketch documentation. The 
[DataSketches 
extension](../development/extensions-core/datasketches-extension.md) must be 
loaded to use this function.|`'0.0'` (STRING)|
-|`APPROX_QUANTILE(expr, probability, [resolution])`|Computes approximate 
quantiles on numeric or 
[approxHistogram](../development/extensions-core/approximate-histograms.md#approximate-histogram-aggregator)
 exprs. The "probability" should be between 0 and 1 (exclusive). The 
"resolution" is the number of centroids to use for the computation. Higher 
resolutions will give more precise results but also have higher overhead. If 
not provided, the default resolution is 50. The [approximate histo [...]
+|`APPROX_QUANTILE(expr, probability, [resolution])`|_Deprecated._ Use 
`APPROX_QUANTILE_DS` instead, which provides a superior 
distribution-independent algorithm with formal error 
guarantees.<br/><br/>Computes approximate quantiles on numeric or 
[approxHistogram](../development/extensions-core/approximate-histograms.md#approximate-histogram-aggregator)
 exprs. The "probability" should be between 0 and 1 (exclusive). The 
"resolution" is the number of centroids to use for the computation. Hi [...]
 |`APPROX_QUANTILE_DS(expr, probability, [k])`|Computes approximate quantiles 
on numeric or [Quantiles 
sketch](../development/extensions-core/datasketches-quantiles.md) exprs. The 
"probability" should be between 0 and 1 (exclusive). The `k` parameter is 
described in the Quantiles sketch documentation. The [DataSketches 
extension](../development/extensions-core/datasketches-extension.md) must be 
loaded to use this function.|`NaN`|
 |`APPROX_QUANTILE_FIXED_BUCKETS(expr, probability, numBuckets, lowerLimit, 
upperLimit, [outlierHandlingMode])`|Computes approximate quantiles on numeric 
or [fixed buckets 
histogram](../development/extensions-core/approximate-histograms.md#fixed-buckets-histogram)
 exprs. The "probability" should be between 0 and 1 (exclusive). The 
`numBuckets`, `lowerLimit`, `upperLimit`, and `outlierHandlingMode` parameters 
are described in the fixed buckets histogram documentation. The [approximate 
hist [...]
 |`DS_QUANTILES_SKETCH(expr, [k])`|Creates a [Quantiles 
sketch](../development/extensions-core/datasketches-quantiles.md) on the values 
of expr, which can be a regular column or a column containing quantiles 
sketches. The `k` parameter is described in the Quantiles sketch documentation. 
The [DataSketches 
extension](../development/extensions-core/datasketches-extension.md) must be 
loaded to use this function.|`'0'` (STRING)|

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to