TheNeuralBit commented on a change in pull request #16066:
URL: https://github.com/apache/beam/pull/16066#discussion_r758675756



##########
File path: sdks/python/apache_beam/dataframe/io.py
##########
@@ -521,10 +535,15 @@ def create_tracker(self, restriction):
       return beam.io.restriction_trackers.UnsplittableRestrictionTracker(
           tracker)
 
-  def process(self, readable_file, tracker=beam.DoFn.RestrictionParam()):
+  def process(
+      self, readable_file, path_indices, tracker=beam.DoFn.RestrictionParam()):
     reader = self.reader
     if isinstance(reader, str):
       reader = getattr(pd, self.reader)
+    start_index = (
+        tracker.current_restriction().start +
+        path_indices[readable_file.metadata.path] *
+        10**int(math.log(2**64 // len(path_indices), 10)))

Review comment:
       That's assuming a reasonably uniform distribution of file sizes though. 
Then again, millions of small files and a small number of TB-sized file is 
probably an equally remote possibility.




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