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


##########
docs/querying/sql-functions.md:
##########
@@ -136,6 +136,42 @@ 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])`
+
+**Function type:** [Aggregation](sql-aggregations.md)
+
+Creates a Tuple sketch.
+
+## ARRAY_OF_DOUBLES_SKETCH_INTERSECT
+
+`ARRAY_OF_DOUBLES_SKETCH_INTERSECT(expr, ..., [nominalEntries])`
+
+**Function type:** [Scalar, sketch](sql-scalar.md#tuple-sketch-functions)
+
+## ARRAY_OF_DOUBLES_SKETCH_NOT
+
+`ARRAY_OF_DOUBLES_SKETCH_NOT(expr, ..., [nominalEntries])`
+
+**Function type:** [Scalar, sketch](sql-scalar.md#tuple-sketch-functions)
+
+## ARRAY_OF_DOUBLES_SKETCH_UNION
+
+`ARRAY_OF_DOUBLES_SKETCH_UNION(expr, ..., [nominalEntries])`
+
+**Function type:** [Scalar, sketch](sql-scalar.md#tuple-sketch-functions)
+
+## ARRAY_OF_DOUBLES_SKETCH_METRICS_SUM_ESTIMATE

Review Comment:
   As to naming— maybe `TUPLE_DOUBLES_SKETCH`, `TUPLE_DOUBLES_INTERSECT`? IMO 
the `ARRAY_OF` doesn't add much, so we can skip it, and `TUPLE` _does_ add 
something: the docs call them "tuple sketches" extensively. I'm OK with the 
originals too. `AODS`, `AODS_INTERSECT` to my eye seem _too_ terse.
   
   As to the bigger potential changes— IMO, the decomposed versions proposed in 
this patch are a good place to start. Tuple sketches, like theta sketches, are 
likely to be combined in different ways by different users. They can be 
intersected, not'ed, and unioned in various ways, and then converted to 
estimates once the set ops are done. Since there isn't a canonical thing that 
we can assume people will want to do, it seems like the composable functions 
are necessary.



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