vtlim commented on code in PR #13887:
URL: https://github.com/apache/druid/pull/13887#discussion_r1144108169


##########
docs/querying/sql-functions.md:
##########
@@ -491,6 +491,48 @@ Returns an approximate rank between 0 and 1 of a given 
value, in which the rank
 
 Creates a Theta sketch on a column containing Theta sketches or a regular 
column.
 
+## DS_TUPLE_DOUBLES
+
+`DS_TUPLE_DOUBLES(expr, [nominalEntries])`
+
+`DS_TUPLE_DOUBLES(dimensionColumnExpr, metricColumnExpr, ..., 
[nominalEntries])`
+
+**Function type:** [Aggregation](sql-aggregations.md)
+
+Creates a Tuple sketch which contains an array of double values as the Summary 
Object. If the last value of the array is a numeric literal, Druid assumes that 
the value is an override parameter for [nominal 
entries](../development/extensions-core/datasketches-tuple.md).
+
+## DS_TUPLE_DOUBLES_INTERSECT
+
+`DS_TUPLE_DOUBLES_INTERSECT(expr, ..., [nominalEntries])`
+
+**Function type:** [Scalar, sketch](sql-scalar.md#tuple-sketch-functions)
+
+Returns an intersection of Tuple sketches which each contain an array of 
double values as their Summary Objects. The values contained in the Summary 
Objects are summed when combined. If the last value of the array is a numeric 
literal, Druid assumes that the value is an override parameter for [nominal 
entries](../development/extensions-core/datasketches-tuple.md).
+
+## DS_TUPLE_DOUBLES_METRICS_SUM_ESTIMATE
+
+`DS_TUPLE_DOUBLES_METRICS_SUM_ESTIMATE(expr)`
+
+**Function type:** [Scalar, sketch](sql-scalar.md#tuple-sketch-functions)
+
+Computes approximate sums of the values contained within a Tuple sketch which 
contains an array of double values as the Summary Object.
+
+## DS_TUPLE_DOUBLES_NOT
+
+`DS_TUPLE_DOUBLES_NOT(expr, ..., [nominalEntries])`
+
+Returns a set difference of Tuple sketches which each contain an array of 
double values as their Summary Objects. The values contained in the Summary 
Object are preserved as-is. If the last value of the array is a numeric 
literal, Druid assumes that the value is an override parameter for [nominal 
entries](../development/extensions-core/datasketches-tuple.md).
+
+**Function type:** [Scalar, sketch](sql-scalar.md#tuple-sketch-functions)

Review Comment:
   The function type line should go below the function signature and above the 
description



##########
docs/querying/sql-aggregations.md:
##########
@@ -139,6 +139,16 @@ 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|
+|--------|-----|-------|
+|`DS_TUPLE_DOUBLES(expr, [nominalEntries])`|Creates a [Tuple 
sketch](../development/extensions-core/datasketches-tuple.md) on the values of 
`expr` which is a column containing Tuple sketches which contain an array of 
double values as their Summary Objects. The `nominalEntries` override parameter 
is optional and described in the Tuple sketch documentation.

Review Comment:
   I've noticed you started including "Summary Objects" as part of the 
description. What does this mean?
   
   I thought the last wording was clearer:
   
   > Creates a Tuple sketch on the values of `expr` which is a column 
containing Tuple sketches.
   
   It seems that all the Tuple sketches are also ArrayofDoublesSketch objects. 
https://druid.apache.org/docs/latest/development/extensions-core/datasketches-tuple.html



##########
docs/querying/sql-functions.md:
##########
@@ -491,6 +491,48 @@ Returns an approximate rank between 0 and 1 of a given 
value, in which the rank
 
 Creates a Theta sketch on a column containing Theta sketches or a regular 
column.
 
+## DS_TUPLE_DOUBLES
+
+`DS_TUPLE_DOUBLES(expr, [nominalEntries])`
+
+`DS_TUPLE_DOUBLES(dimensionColumnExpr, metricColumnExpr, ..., 
[nominalEntries])`
+
+**Function type:** [Aggregation](sql-aggregations.md)
+
+Creates a Tuple sketch which contains an array of double values as the Summary 
Object. If the last value of the array is a numeric literal, Druid assumes that 
the value is an override parameter for [nominal 
entries](../development/extensions-core/datasketches-tuple.md).
+
+## DS_TUPLE_DOUBLES_INTERSECT
+
+`DS_TUPLE_DOUBLES_INTERSECT(expr, ..., [nominalEntries])`
+
+**Function type:** [Scalar, sketch](sql-scalar.md#tuple-sketch-functions)
+
+Returns an intersection of Tuple sketches which each contain an array of 
double values as their Summary Objects. The values contained in the Summary 
Objects are summed when combined. If the last value of the array is a numeric 
literal, Druid assumes that the value is an override parameter for [nominal 
entries](../development/extensions-core/datasketches-tuple.md).
+
+## DS_TUPLE_DOUBLES_METRICS_SUM_ESTIMATE
+
+`DS_TUPLE_DOUBLES_METRICS_SUM_ESTIMATE(expr)`
+
+**Function type:** [Scalar, sketch](sql-scalar.md#tuple-sketch-functions)
+
+Computes approximate sums of the values contained within a Tuple sketch which 
contains an array of double values as the Summary Object.
+
+## DS_TUPLE_DOUBLES_NOT
+
+`DS_TUPLE_DOUBLES_NOT(expr, ..., [nominalEntries])`
+
+Returns a set difference of Tuple sketches which each contain an array of 
double values as their Summary Objects. The values contained in the Summary 
Object are preserved as-is. If the last value of the array is a numeric 
literal, Druid assumes that the value is an override parameter for [nominal 
entries](../development/extensions-core/datasketches-tuple.md).

Review Comment:
   ```suggestion
   Returns a set difference of Tuple sketches which each contain an array of 
double values as their Summary Objects. The values contained in the Summary 
Object are preserved as is. If the last value of the array is a numeric 
literal, Druid assumes that the value is an override parameter for [nominal 
entries](../development/extensions-core/datasketches-tuple.md).
   ```



-- 
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]

Reply via email to