ccaominh commented on a change in pull request #8465: disallow whitespace 
characters in data source names
URL: https://github.com/apache/incubator-druid/pull/8465#discussion_r321516559
 
 

 ##########
 File path: 
server/src/main/java/org/apache/druid/segment/indexing/DataSchema.java
 ##########
 @@ -104,11 +106,13 @@ static void validateDatasourceName(String dataSource)
         !Strings.isNullOrEmpty(dataSource),
         "dataSource cannot be null or empty. Please provide a dataSource."
     );
-    Preconditions.checkArgument(!dataSource.contains("/"), "dataSource cannot 
contain the '/' character.");
+    Pattern p = Pattern.compile("(?s).*[^\\S ].*");
 
 Review comment:
   Using the term "whitespace" in the code and PR title may be misleading as 
not all whitespace is forbidden

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to