TyrantLucifer commented on code in PR #3276:
URL: 
https://github.com/apache/incubator-seatunnel/pull/3276#discussion_r1012443948


##########
seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/reader/TextReadStrategy.java:
##########
@@ -47,15 +47,19 @@ public class TextReadStrategy extends AbstractReadStrategy {
     private DateUtils.Formatter dateFormat = DateUtils.Formatter.YYYY_MM_DD;
     private DateTimeUtils.Formatter datetimeFormat = 
DateTimeUtils.Formatter.YYYY_MM_DD_HH_MM_SS;
     private TimeUtils.Formatter timeFormat = TimeUtils.Formatter.HH_MM_SS;
+    private Long skipHeaderNumber = 0L;

Review Comment:
   ```suggestion
       private long skipHeaderNumber = 0L;
   ```



##########
seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/reader/TextReadStrategy.java:
##########
@@ -47,15 +47,19 @@ public class TextReadStrategy extends AbstractReadStrategy {
     private DateUtils.Formatter dateFormat = DateUtils.Formatter.YYYY_MM_DD;
     private DateTimeUtils.Formatter datetimeFormat = 
DateTimeUtils.Formatter.YYYY_MM_DD_HH_MM_SS;
     private TimeUtils.Formatter timeFormat = TimeUtils.Formatter.HH_MM_SS;
+    private Long skipHeaderNumber = 0L;
 
     @Override
     public void read(String path, Collector<SeaTunnelRow> output) throws 
IOException, FilePluginException {
+        if (pluginConfig.hasPath(BaseSourceConfig.SKIP_HEADER_ROW_NUMBER)) {

Review Comment:
   Treat `skipHeaderNumber` as a class attribute and init it in 
`setPluginConfig` is better.



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