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_r321514230
 
 

 ##########
 File path: 
server/src/test/java/org/apache/druid/segment/indexing/DataSchemaTest.java
 ##########
 @@ -324,6 +325,38 @@ public void testEmptyDatasource()
     );
   }
 
+
+  @Test
+  public void testWhitespaceDatasource()
+  {
+    String[] dataSource = {"\tab\t", "\rcarriage\return\r", "\nnew\nline\n"};
 
 Review comment:
   Consider using a `Map` instead to keep the respective `dataSource` and 
`invalidChars` elements paired correctly. For example:
   ```java
   Map<String, String> invalidCharToDataSourceName = ImmutableMap.of(
       "\\t", "\tab\t",
       "\\r", "\rcarriage\return\r",
       "\\n", "\nnew\nline\n"
   );
   
   // iterate over map entries
   ```

----------------------------------------------------------------
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