This is an automated email from the ASF dual-hosted git repository.
vogievetsky 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 5ed5c83aab Clarified the behaviour of SQL COUNT(DISTINCT dim) on
multi-value dimensions (#13128)
5ed5c83aab is described below
commit 5ed5c83aab6bac365cc584e04fdf6122c7ac5ed1
Author: hosswald <[email protected]>
AuthorDate: Wed Sep 21 03:03:34 2022 +0200
Clarified the behaviour of SQL COUNT(DISTINCT dim) on multi-value
dimensions (#13128)
* Clarified the behaviour of COUNT(DISTINCT column) on multi-value columns
* Update docs/querying/sql-aggregations.md
Co-authored-by: Charles Smith <[email protected]>
Co-authored-by: Vadim Ogievetsky <[email protected]>
Co-authored-by: Charles Smith <[email protected]>
---
docs/querying/sql-aggregations.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/querying/sql-aggregations.md
b/docs/querying/sql-aggregations.md
index 07a1183f15..cf43682971 100644
--- a/docs/querying/sql-aggregations.md
+++ b/docs/querying/sql-aggregations.md
@@ -66,7 +66,7 @@ In the aggregation functions supported by Druid, only
`COUNT`, `ARRAY_AGG`, and
|Function|Notes|Default|
|--------|-----|-------|
|`COUNT(*)`|Counts the number of rows.|`0`|
-|`COUNT(DISTINCT expr)`|Counts distinct values of `expr`.<br /><br />When
`useApproximateCountDistinct` is set to "true" (the default), this is an alias
for `APPROX_COUNT_DISTINCT`. The specific algorithm depends on the value of
[`druid.sql.approxCountDistinct.function`](../configuration/index.md#sql). In
this mode, you can use strings, numbers, or prebuilt sketches. If counting
prebuilt sketches, the prebuilt sketch type must match the selected
algorithm.<br /><br />When `useApproximate [...]
+|`COUNT(DISTINCT expr)`|Counts distinct values of `expr`.<br /><br />When
`useApproximateCountDistinct` is set to "true" (the default), this is an alias
for `APPROX_COUNT_DISTINCT`. The specific algorithm depends on the value of
[`druid.sql.approxCountDistinct.function`](../configuration/index.md#sql). In
this mode, you can use strings, numbers, or prebuilt sketches. If counting
prebuilt sketches, the prebuilt sketch type must match the selected
algorithm.<br /><br />When `useApproximate [...]
|`SUM(expr)`|Sums numbers.|`null` if
`druid.generic.useDefaultValueForNull=false`, otherwise `0`|
|`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)|
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]