ektravel commented on code in PR #14497:
URL: https://github.com/apache/druid/pull/14497#discussion_r1247195109


##########
docs/querying/aggregations.md:
##########
@@ -422,6 +389,121 @@ It is not possible to determine a priori how well this 
aggregator will behave fo
 
 For these reasons, we have deprecated this aggregator and recommend using the 
DataSketches Quantiles aggregator instead for new and existing use cases, 
although we will continue to support Approximate Histogram for backwards 
compatibility.
 
+
+## Expression aggregators
+
+### Expression aggregator
+
+Query time only aggregator that can aggregate results using [Druid 
expressions](./math-expr.md) functions to facilitate building custom functions.
+
+| property | description | required |
+| --- | --- | --- |
+| `type` | must be `expression` | true |
+| `name` | aggregator output name | true |
+| `fields` | list of aggregator input columns | true |
+| `accumulatorIdentifier` | variable which identifies the accumulator value in 
the `fold` and `combine` expressions | false (default `__acc`)|
+| `fold` | expression to accumulate values from `fields`. The result of the 
expression will be stored in `accumulatorIdentifier` and available to the next 
computation. | true |
+| `combine` | expression to combine the results of various `fold` expressions 
of each segment when merging results. If not defined and `fold` has a single 
input column in `fields`, then the `fold` expression may be used, otherwise the 
input is available to the expression as the `name`| false (default to `fold` 
expression if and only if the expression has a single input in `fields`)|

Review Comment:
   ```suggestion
   | `combine` | The expression to combine the results of various `fold` 
expressions of each segment when merging results. You can use the `fold` 
expression if `combine` is not defined and `fold` has a single input column in 
`fields`. Otherwise, the input is available to the expression as `name`.| false 
(Defaults to `fold` expression if the expression has a single input in 
`fields`.)|
   ```



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