razvanculea commented on code in PR #35137:
URL: https://github.com/apache/beam/pull/35137#discussion_r2150863530


##########
sdks/python/apache_beam/io/iobase.py:
##########
@@ -1126,12 +1167,13 @@ def __init__(self, sink: Sink) -> None:
     super().__init__()
     self.sink = sink
 
-  def expand(self, pcoll):
+  def _expand_bounded(self, pcoll, min_shards):
+    """Handles the expansion logic for a bounded PCollection."""
     do_once = pcoll.pipeline | 'DoOnce' >> core.Create([None])
     init_result_coll = do_once | 'InitializeWrite' >> core.Map(
         lambda _, sink: sink.initialize_write(), self.sink)
-    if getattr(self.sink, 'num_shards', 0):
-      min_shards = self.sink.num_shards
+
+    if (min_shards >= 1):

Review Comment:
   good catch, but no for bounded write i kept the same code as before where 0 
is used to write per bundle.
   for unbounded i'll default to 1 in that part of the Write impl



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