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 2019/12/07 01:18:37 UTC

[GitHub] [incubator-druid] jon-wei commented on a change in pull request #8993: add customize separator for TSV inputFormat

jon-wei commented on a change in pull request #8993: add customize separator for TSV inputFormat
URL: https://github.com/apache/incubator-druid/pull/8993#discussion_r355088219
 
 

 ##########
 File path: core/src/main/java/org/apache/druid/data/input/impl/DelimitedInputFormat.java
 ##########
 @@ -117,6 +122,18 @@ protected SeparateValueInputFormat(
     }
   }
 
+  private static Format getFormat(String delimiter)
+  {
+    if (",".equals(delimiter)) {
+      return Format.CSV;
+    } else if (delimiter != null && delimiter.length() > 0) {
 
 Review comment:
   Since only single character delimiters are supported, suggest adding a check for this to the `DelimitedInputFormat` constructor that throws an exception if a multichar delimiter is provided, otherwise the behavior might be mysterious to users (specifying a delimiter but it's silently ignored)

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