From 3baf31e9a8d056c7eeba2ee8576c638de9816481 Mon Sep 17 00:00:00 2001 From: Clint Wylie Date: Wed, 28 Aug 2019 08:30:31 -0700 Subject: [PATCH] add documentation for group by array based result format (#8416) --- docs/querying/groupbyquery.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/querying/groupbyquery.md b/docs/querying/groupbyquery.md index 0cac52501cd..d9c4081c6c9 100644 --- a/docs/querying/groupbyquery.md +++ b/docs/querying/groupbyquery.md @@ -442,3 +442,19 @@ Supported query contexts: |`maxIntermediateRows`|Can be used to lower the value of `druid.query.groupBy.maxIntermediateRows` for this query.|None| |`maxResults`|Can be used to lower the value of `druid.query.groupBy.maxResults` for this query.|None| |`useOffheap`|Set to true to store aggregations off-heap when merging results.|false| + +##### Array based result rows + +Internally Druid always uses an array based representation of groupBy result rows, but by default this is translated +into a map based result format at the Broker. To reduce the overhead of this translation, results may also be returned +from the Broker directly in the array based format if `resultAsArray` is set to `true` on the query context. + +Each row is positional, and has the following fields, in order: + +* Timestamp (optional; only if granularity != ALL) +* Dimensions (in order) +* Aggregators (in order) +* Post-aggregators (optional; in order, if present) + +This schema is not available on the response, so it must be computed from the issued query in order to properly read +the results.