You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2018/08/02 23:57:07 UTC

[GitHub] chengchengpei commented on a change in pull request #6072: validate baseDataSource non-empty string in DerivativeDataSourceMetad…

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:
users@infra.apache.org


With regards,
Apache Git Services

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