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 <suneet@apache.org>

* Update server/src/main/java/org/apache/druid/segment/indexing/DataSchema.java

Co-authored-by: Suneet Saldanha <suneet@apache.org>

* Update server/src/main/java/org/apache/druid/segment/indexing/DataSchema.java

Co-authored-by: Caroline <caroline@Caroline-Harris.attlocal.net>
Co-authored-by: Suneet Saldanha <suneet@apache.org>
Co-authored-by: Caroline <caroline@Caroline-Harris.local>
This commit is contained in:
Caroline1000 2021-08-30 20:22:11 -07:00 committed by GitHub
parent c7e5fee452
commit adeae3960f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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. // this validation is not necessarily going to be able to catch everything. It will run again in getDimensionsSpec.
computeAndValidateOutputFieldNames(this.dimensionsSpec, this.aggregators); computeAndValidateOutputFieldNames(this.dimensionsSpec, this.aggregators);
if (this.granularitySpec.isRollup()) { if (this.granularitySpec.isRollup() && this.aggregators.length == 0) {
log.warn( log.warn(
"Rollup is enabled for dataSource [%s] but no metricsSpec has been provided. " "Rollup is enabled for dataSource [%s] but no metricsSpec has been provided. "
+ "Are you sure this is what you want?", + "Are you sure this is what you want?",