nikie commented on a change in pull request #13350:
URL: https://github.com/apache/beam/pull/13350#discussion_r525559201



##########
File path: sdks/python/apache_beam/io/mongodbio.py
##########
@@ -241,6 +275,27 @@ def _get_split_keys(self, desired_chunk_size_in_mb, 
start_pos, end_pos):
               max={'_id': end_pos},
               maxChunkSize=desired_chunk_size_in_mb)['splitKeys'])
 
+  def _get_buckets(self, desired_chunk_size, start_pos, end_pos):
+    if start_pos >= end_pos:
+      # single document not splittable
+      return []
+    size = self.estimate_size()
+    bucket_count = size // desired_chunk_size

Review comment:
       Thanks, @y1chi!
   I will look closer how it works in Java sdk and will try to filter by _id 
ranges.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to