chengchengpei commented on a change in pull request #6072: validate 
baseDataSource non-empty string in DerivativeDataSourceMetad…
URL: https://github.com/apache/incubator-druid/pull/6072#discussion_r207408616
 
 

 ##########
 File path: 
extensions-contrib/materialized-view-maintenance/src/main/java/io/druid/indexing/materializedview/DerivativeDataSourceMetadata.java
 ##########
 @@ -41,9 +42,11 @@ public DerivativeDataSourceMetadata(
       @JsonProperty("metrics") Set<String> metrics
   )
   {
-    this.baseDataSource = Preconditions.checkNotNull(baseDataSource, 
"baseDataSource cannot be null. This is not a valid 
DerivativeDataSourceMetadata.");
     this.dimensions = Preconditions.checkNotNull(dimensions, "dimensions 
cannot be null. This is not a valid DerivativeDataSourceMetadata.");
     this.metrics = Preconditions.checkNotNull(metrics, "metrics cannot be 
null. This is not a valid DerivativeDataSourceMetadata.");
+
+    Preconditions.checkArgument(!Strings.isNullOrEmpty(baseDataSource), 
"baseDataSource cannot be null or empty. Please provide a baseDataSource.");
+    this.baseDataSource = baseDataSource;
 
 Review comment:
   @jihoonson fixed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org

Reply via email to