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



##########
File path: sdks/python/apache_beam/dataframe/io.py
##########
@@ -540,10 +540,15 @@ def process(
     reader = self.reader
     if isinstance(reader, str):
       reader = getattr(pd, self.reader)
+    indices_per_file = 10**int(math.log(2**64 // len(path_indices), 10))
+    if readable_file.metadata.size_in_bytes > indices_per_file:
+      raise RuntimeError(
+          f'Cannot safely index records from {len(path_indices)} files '
+          f'of size {readable_file.metadata.size_in_bytes} '
+          f'as their product is greater than 2^63.')

Review comment:
       ah yeah I didn't make the connection that `start_index` is mixing bytes 
and elements, thanks for clarifying.




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