gianm commented on a change in pull request #12253:
URL: https://github.com/apache/druid/pull/12253#discussion_r804721274



##########
File path: docs/querying/multi-value-dimensions.md
##########
@@ -375,3 +375,8 @@ This query returns the following result:
 Note that, for groupBy queries, you could get similar result with a [having 
spec](having.md) but using a filtered
 `dimensionSpec` is much more efficient because that gets applied at the lowest 
level in the query processing pipeline.
 Having specs are applied at the outermost level of groupBy query processing.
+
+## Disable GroupBy on multivalue columns
+
+As grouping on multivalue columns causes implicit unnest, users can avoid this 
behaviour by setting
+`groupByEnableMultiValueUnnesting` in the query context to `false`. This will 
result the query to error out.

Review comment:
       Alternatively we can keep this documented but change the error message 
to not mention array-based dimensions. In that case, we can change the error 
message to this:
   
   > Encountered multi-value dimension [%s] that cannot be processed with %s 
set to false. Consider setting %s to true for unnesting behavior, or using an 
expression to create a scalar from the multi-value dimension.
   
   For the docs, a couple style points:
   
   1. The rest of this page uses second person ("you can…") rather than third 
("users can…") so we should stick to that.
   2. We usually use US spelling in documentation (e.g. behavior instead of 
behaviour).
   
   So I'd go with:
   
   > You can disable the implicit unnesting behavior for groupBy by setting 
`groupByEnableMultiValueUnnesting: false` in your query context. In this mode, 
the groupBy engine will return an error instead of completing the query. This 
is a safety feature for situations where you believe that all dimensions are 
singly-valued and want the engine to reject any multi-valued dimensions that 
were inadvertently included. 
   
   Also, all documented groupBy parameters should be included in the 
groupbyquery.md document as well, under "GroupBy v2 configurations". So if you 
mention this here it should be mentioned in the main doc too.




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