TheNeuralBit commented on a change in pull request #16066:
URL: https://github.com/apache/beam/pull/16066#discussion_r758678454
##########
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:
This is a little conservative, couldn't we detect this based on the
number of rows, rather than using byte size as a proxy?
--
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]