gianm commented on a change in pull request #12253:
URL: https://github.com/apache/druid/pull/12253#discussion_r804064592
##########
File path:
processing/src/main/java/org/apache/druid/query/groupby/GroupByQueryConfig.java
##########
@@ -244,6 +253,10 @@ public GroupByQueryConfig withOverrides(final GroupByQuery
query)
getNumParallelCombineThreads()
);
newConfig.vectorize = query.getContextBoolean(QueryContexts.VECTORIZE_KEY,
isVectorize());
+ newConfig.enableMultiValueUnnesting = query.getContextValue(
Review comment:
Should use getContextBoolean for booleans.
##########
File path:
processing/src/main/java/org/apache/druid/query/groupby/GroupByQueryEngine.java
##########
@@ -91,7 +91,13 @@ public GroupByQueryEngine(
"Null storage adapter found. Probably trying to issue a query
against a segment being memory unmapped."
);
}
-
+ if
(!query.getContextValue(GroupByQueryConfig.CTX_KEY_ENABLE_MULTI_VALUE_UNNESTING,
true)) {
+ throw new UnsupportedOperationException(String.format(
+ "GroupBy v1 does not support %s as false. Set %s to true",
Review comment:
How about:
> Set %s to true, or use groupBy v2.
##########
File path:
processing/src/main/java/org/apache/druid/query/groupby/epinephelinae/GroupByQueryEngineV2.java
##########
@@ -228,6 +228,17 @@ public GroupByEngineIterator make()
processingBuffer
);
+ final boolean allSingleValueDims =
hasNoExplodingDimensions(columnSelectorFactory,
+
query.getDimensions());
+ if
(!(query.getContextValue(GroupByQueryConfig.CTX_KEY_ENABLE_MULTI_VALUE_UNNESTING,
true))
+ && !allSingleValueDims) {
+ throw new ISE(
Review comment:
We should name the dimension so this error message is more actionable.
People are going to need to know which dimension is causing the problem, so
they can either remove it, set it to array mode, or process it in some other
way.
How about:
1. Change hasNoExplodingDimensions to findExplodingDimensions (i.e., return
the names of the exploding dimensions).
2. Change the error message to:
> Encountered multi-value dimensions [%s] that cannot be processed with %s
set to false. Consider changing these dimensions to arrays or setting %s to
true.
--
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]