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_r400690680
 
 

 ##########
 File path: 
hadoop/src/main/java/org/apache/carbondata/hadoop/testutil/StoreCreator.java
 ##########
 @@ -407,6 +407,7 @@ public static void loadData(CarbonLoadModel loadModel, 
String storeLocation)
     CSVInputFormat.setNumberOfColumns(
         configuration, String.valueOf(loadModel.getCsvHeaderColumns().length));
     CSVInputFormat.setMaxColumns(configuration, "10");
+    CSVInputFormat.setLineSeparator(configuration, 
loadModel.getLineSeparator());
 
 Review comment:
   > If not null, then only set the line separator. Else it may lead to wrong 
behavior.
   > You already did like this in `CommonUtil.scala`
   > Follow the same
   
   `public static void setLineSeparator(Configuration configuration, String 
lineSeparator) {
       if (lineSeparator != null && !lineSeparator.isEmpty()) {
         configuration.set(LINE_SEPARATOR, lineSeparator);
       }
     }`
   This is done inside the setLineSeparator.

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