jack86596 commented on a change in pull request #3664: [CARBONDATA-3740] Add 
line separator option to load command to configure the line separator during 
csv parsing.
URL: https://github.com/apache/carbondata/pull/3664#discussion_r400692411
 
 

 ##########
 File path: 
integration/spark/src/main/scala/org/apache/spark/sql/catalyst/CarbonParserUtil.scala
 ##########
 @@ -957,6 +958,16 @@ object CarbonParserUtil {
       }
     }
 
+    // Validate LINE_SEPARATOR length
+    if (options.exists(_._1.equalsIgnoreCase("LINE_SEPARATOR"))) {
+      val line_separator: String = CarbonUtil.unescapeChar(
+        options.get("line_separator").get.head._2)
+      if (line_separator.isEmpty || line_separator.length > 2) {
 
 Review comment:
   > do we need to have validations for supported line separators also ?
   > because for example, If I configured 'a' , it will not fail now. better to 
fail.
   
   Univocity parser allow any one or two characters to be the line separator, 
we can just do the same. User may want use 'a' as line separator.

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


With regards,
Apache Git Services

Reply via email to