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_r400690367
##########
File path:
integration/presto/src/test/scala/org/apache/carbondata/presto/util/CarbonDataStoreCreator.scala
##########
@@ -270,6 +270,7 @@ object CarbonDataStoreCreator {
CSVInputFormat.setEscapeCharacter(configuration, loadModel.getEscapeChar)
CSVInputFormat.setHeaderExtractionEnabled(configuration, true)
CSVInputFormat.setQuoteCharacter(configuration, loadModel.getQuoteChar)
+ 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:
[email protected]
With regards,
Apache Git Services