shunping-google commented on code in PR #29202:
URL: https://github.com/apache/beam/pull/29202#discussion_r1381892821


##########
sdks/java/core/src/main/java/org/apache/beam/sdk/io/TextSource.java:
##########
@@ -171,21 +194,42 @@ protected void startReading(ReadableByteChannel channel) 
throws IOException {
           } else {
             startOfNextRecord = bufferPosn = (int) requiredPosition;
           }
+          skipHeader(skipHeaderLines, true);
         } else {
-          ((SeekableByteChannel) channel).position(requiredPosition);
-          startOfNextRecord = requiredPosition;
+          skipHeader(skipHeaderLines, false);
+          if (requiredPosition > startOfNextRecord) {

Review Comment:
   nvm. In this case, among those readers, only one will have an end position 
outside of the header lines, and will continue to read. So this should not be 
an issue then.



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