nikie commented on a change in pull request #15775:
URL: https://github.com/apache/beam/pull/15775#discussion_r735545870
##########
File path: sdks/python/apache_beam/io/textio.py
##########
@@ -172,7 +172,12 @@ def split_points_unclaimed(stop_position):
# belongs to the current bundle, hence ignoring that is incorrect.
# Seeking to one byte before prevents that.
- file_to_read.seek(start_offset - 1)
+ if self._delimiter is not None and start_offset >=
len(self._delimiter):
Review comment:
Can we add a test for this case?
~I could not find tests in `textio_test.py` which split the data into
multiple bundles.~
This one splits into bundles:
`textio_test.TextSourceTest.test_read_after_splitting`
Also there are tests in `filebasedsource_test.py` which do this (can be used
as an example).
--
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]