From adeae3960fa64564ca8955742d9445ab5c7e563e Mon Sep 17 00:00:00 2001 From: Caroline1000 Date: Mon, 30 Aug 2021 20:22:11 -0700 Subject: [PATCH] DataSchema: improve rollup WARN message (#11631) * improve rollup WARN message * Update server/src/main/java/org/apache/druid/segment/indexing/DataSchema.java Co-authored-by: Suneet Saldanha * Update server/src/main/java/org/apache/druid/segment/indexing/DataSchema.java Co-authored-by: Suneet Saldanha * Update server/src/main/java/org/apache/druid/segment/indexing/DataSchema.java Co-authored-by: Caroline Co-authored-by: Suneet Saldanha Co-authored-by: Caroline --- .../main/java/org/apache/druid/segment/indexing/DataSchema.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/main/java/org/apache/druid/segment/indexing/DataSchema.java b/server/src/main/java/org/apache/druid/segment/indexing/DataSchema.java index a6be41e98b9..1e717f5d17b 100644 --- a/server/src/main/java/org/apache/druid/segment/indexing/DataSchema.java +++ b/server/src/main/java/org/apache/druid/segment/indexing/DataSchema.java @@ -114,7 +114,7 @@ public class DataSchema // this validation is not necessarily going to be able to catch everything. It will run again in getDimensionsSpec. computeAndValidateOutputFieldNames(this.dimensionsSpec, this.aggregators); - if (this.granularitySpec.isRollup()) { + if (this.granularitySpec.isRollup() && this.aggregators.length == 0) { log.warn( "Rollup is enabled for dataSource [%s] but no metricsSpec has been provided. " + "Are you sure this is what you want?",