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



##########
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:
       It's harder to know the number of rows ahead of time (though we could 
keep track after the fact), but more importantly when we split we start the 
index based on the byte offset so we can't actually use most of that headroom 
anyway. 




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