jon-wei commented on a change in pull request #8487: Add initial SQL support 
for non-expression sketch postaggs
URL: https://github.com/apache/incubator-druid/pull/8487#discussion_r335716107
 
 

 ##########
 File path: docs/querying/sql.md
 ##########
 @@ -363,6 +366,44 @@ All 'array' references in the multi-value string function 
documentation can refe
 | `MV_TO_STRING(arr,str)` | joins all elements of arr by the delimiter 
specified by str |
 | `STRING_TO_MV(str1,str2)` | splits str1 into an array on the delimiter 
specified by str2 |
 
+### Sketch operators
+
+These functions operate on expressions or columns that return sketch objects.
+
+#### HLL sketch operators
+
+The following functions operate on [DataSketches HLL 
sketches](../development/extensions-core/datasketches-hll.html).
+The [DataSketches 
extension](../development/extensions-core/datasketches-extension.html) must be 
loaded to use the following functions.
+
+|Function|Notes|
+|--------|-----|
+|`HLL_SKETCH_ESTIMATE(expr)`|Returns the distinct count estimate from an HLL 
sketch. `expr` must return an HLL sketch.|
 
 Review comment:
   Hmm, i actually like the new functions added in this PR more than 
`APPROX_COUNT_DISTINCT_DS_HLL`, I think they express a clearer boundary between 
the aggregated sketch object and the operations that can be performed on said 
object. The new functions names also have a 1-to-1 correspondence with the 
underlying native aggs/postaggs which I think is nice.
   
   If not for backwards compatibility, I would actually consider dropping 
`APPROX_COUNT_DISTINCT_DS_HLL`, it was introduced as a way to allow people to 
use the datasketches implementations before we supported postaggs in SQL (with 
this patch).
   
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org

Reply via email to