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_r335717239
########## 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.| +|`HLL_SKETCH_ESTIMATE_WITH_ERROR_BOUNDS(expr, [numStdDev])`|Returns the distinct count estimate and error bounds from an HLL sketch. `expr` must return an HLL sketch. An optional `numStdDev` argument can be provided.| +|`HLL_SKETCH_UNION([lgK, tgtHllType], expr0, expr1, ...)`|Returns a union of HLL sketches, where each input expression must return an HLL sketch. The `lgK` and `tgtHllType` can be optionally specified as the first parameter; if provided, both optional parameters must be specified.| +|`HLL_SKETCH_TO_STRING(expr)`|Returns a human-readable string representation of an HLL sketch for debugging. `expr` must return an HLL sketch.| + +#### Theta sketch operators + +The following functions operate on [theta sketches](../development/extensions-core/datasketches-theta.html). +The [DataSketches extension](../development/extensions-core/datasketches-extension.html) must be loaded to use the following functions. + +|Function|Notes| +|--------|-----| +|`THETA_SKETCH_ESTIMATE(expr)`|Returns the distinct count estimate from a theta sketch. `expr` must return a theta sketch.| +|`THETA_SKETCH_ESTIMATE_WITH_ERROR_BOUNDS(expr, errorBoundsStdDev)`|Returns the distinct count estimate and error bounds from a theta sketch. `expr` must return a theta sketch.| Review comment: I think given the context and other docs (https://druid.apache.org/docs/latest/development/extensions-core/datasketches-theta.html), `estimate` is clear here ---------------------------------------------------------------- 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