yugan95 commented on code in PR #9375:
URL: https://github.com/apache/paimon/pull/9375#discussion_r3852750614


##########
paimon-python/pypaimon/write/writer/data_writer.py:
##########
@@ -104,15 +105,33 @@ def __init__(self, table, partition: Tuple, bucket: int, 
max_seq_number: int, op
         # the table schema is fixed for the lifetime of this writer.
         self._paimon_field_id: Dict[str, int] = {pf.name: pf.id for pf in 
self.table.fields}
 
+    # Set by the composite writers when a flush landed its normal data file 
but a
+    # later phase of the same flush failed; see their 
``_close_current_writers``.
+    _pending_normal_meta: Optional[DataFileMeta] = None
+
+    @property
+    def pending_row_count(self) -> int:
+        """Number of buffered rows not yet written to a file."""
+        return self._buffer.num_rows

Review Comment:
   Fixed. Both composite writers now override it with the count they already 
keep for their own rolling check: the normal buffer's rows, or a sidecar's when 
the table has no normal columns. That replaces their private 
`_current_row_count`.



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