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


##########
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:
   Do we need to verify the length? No error will be reported if a mismatch 
occurs, for example: quote_char="||".



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