yzeng1618 commented on code in PR #10185:
URL: https://github.com/apache/seatunnel/pull/10185#discussion_r2622119140


##########
seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/reader/CsvReadStrategy.java:
##########
@@ -174,6 +174,20 @@ public void readProcess(
         }
     }
 
+    private CSVFormat getCSVFormat() {
+        String quoteChar = 
readonlyConfig.get(FileBaseSourceOptions.QUOTE_CHAR);
+        String escapeChar = 
readonlyConfig.get(FileBaseSourceOptions.ESCAPE_CHAR);
+        Builder builder =
+                
CSVFormat.EXCEL.builder().setIgnoreEmptyLines(true).setDelimiter(getDelimiter());
+        if (StringUtils.isNotEmpty(quoteChar)) {
+            builder.setQuote(quoteChar.charAt(0));
+        }
+        if (StringUtils.isNotEmpty(escapeChar)) {
+            builder.setEscape(escapeChar.charAt(0));
+        }

Review Comment:
   Sorry, this comment was added together with the one from this morning. I 
didn’t notice it was in pending status and just submitted it now.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to