clintropolis commented on code in PR #15093:
URL: https://github.com/apache/druid/pull/15093#discussion_r1349876118
##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/util/DimensionSchemaUtils.java:
##########
@@ -74,11 +92,33 @@ public static DimensionSchema createDimensionSchema(
case ARRAY:
switch (type.getElementType().getType()) {
case STRING:
- return new StringDimensionSchema(column,
DimensionSchema.MultiValueHandling.ARRAY, null);
+ if (arrayIngestMode == ArrayIngestMode.NONE) {
+ throw InvalidInput.exception(
+ "String arrays can not be ingested when '%s' is set to
'%s'. Either set '%s' in query context "
+ + "to 'array' to ingest the string array as an array, or
set it to 'mvd' to ingest the string array "
+ + "as MVD (which is legacy behaviour and not
recommmended)",
+ MultiStageQueryContext.CTX_ARRAY_INGEST_MODE,
+ StringUtils.toLowerCase(arrayIngestMode.name()),
+ MultiStageQueryContext.CTX_ARRAY_INGEST_MODE
Review Comment:
I don't think we should recommend MVD mode at all here, instead we should
always recommend array mode and suggest using `ARRAY_TO_MV` if people want to
store things as a MVD.
--
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]