vtlim commented on code in PR #13887: URL: https://github.com/apache/druid/pull/13887#discussion_r1127088445
########## docs/querying/sql-functions.md: ########## @@ -136,6 +136,22 @@ Returns an array of all values of the specified expression. Concatenates array inputs into a single array. +## ARRAY_OF_DOUBLES_SKETCH + +`ARRAY_OF_DOUBLES_SKETCH(expr, [nominalEntries])` + +`ARRAY_OF_DOUBLES_SKETCH(dimensionColumnExpr, metricColumnExpr..., [nominalEntries])` + +Creates a Tuple sketch Review Comment: ```suggestion Creates a Tuple sketch. ``` ########## docs/querying/sql-functions.md: ########## @@ -136,6 +136,22 @@ Returns an array of all values of the specified expression. Concatenates array inputs into a single array. +## ARRAY_OF_DOUBLES_SKETCH + +`ARRAY_OF_DOUBLES_SKETCH(expr, [nominalEntries])` + +`ARRAY_OF_DOUBLES_SKETCH(dimensionColumnExpr, metricColumnExpr..., [nominalEntries])` + +Creates a Tuple sketch + +**Function type:** [Aggregation](sql-aggregations.md) + +## ARRAY_OF_DOUBLES_SKETCH_METRICS_SUM_ESTIMATE + +`ARRAY_OF_DOUBLES_SKETCH_METRICS_SUM_ESTIMATE(expr)` + +Computes approximate sums of the values contained within a Tuple sketch Review Comment: ```suggestion Computes approximate sums of the values contained within a Tuple sketch. **Function type:** [Aggregation](sql-aggregations.md) ``` ########## docs/querying/sql-aggregations.md: ########## @@ -139,6 +139,17 @@ Load the [DataSketches extension](../development/extensions-core/datasketches-ex |`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.<br/><br/>See the [known issue](sql-translation.md#approximations) with this function.|`'0'` (STRING)| +### Tuple sketch functions + +Load the [DataSketches extension](../development/extensions-core/datasketches-extension.md) to use the following functions. + +|Function|Notes|Default| +|--------|-----|-------| +|`ARRAY_OF_DOUBLES_SKETCH(expr, [nominalEntries])`|Creates a [Tuple sketch](../development/extensions-core/datasketches-tuple.md) on the values of `expr` which is a column containing Tuple sketches. The `nominalEntries` override parameter is optional and described in the Tuple sketch documentation. +|`ARRAY_OF_DOUBLES_SKETCH(dimensionColumnExpr, metricColumnExpr..., [nominalEntries])`|Creates a [Tuple sketch](../development/extensions-core/datasketches-tuple.md) on the dimension value of `dimensionColumnExpr` and the metric values contained in the list of `metricColumnExpr` columns. The `nominalEntries` override parameter is optional and described in the Tuple sketch documentation. Review Comment: Something that isn't clear to me based on this notation is how to provide multiple metrics columns. For example, if you use this format, ``` ARRAY_OF_DOUBLES_SKETCH(dimension1, metric1, metric2, metric3) ``` How do you know if `metric3` is a metric column, or if it is the optional parameter for nominal entries? -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
