JingsongLi commented on code in PR #10655:
URL: https://github.com/apache/paimon/pull/10655#discussion_r4346490264


##########
paimon-python/pypaimon/execution/python/write/table_write.py:
##########
@@ -227,6 +227,10 @@ def with_blob_consumer(self, blob_consumer: BlobConsumer):
         writer = self.writer
         if blob_consumer is not None and not callable(blob_consumer):
             raise TypeError('blob_consumer must be callable')
+        if writer.file_store_write.data_writers:

Review Comment:
   [P2] Preserve consumer reconfiguration for future bucket writers
   
   This new guard rejects previously valid with_blob_consumer(...) and 
with_blob_consumer(None) calls once any bucket exists. FileStoreWrite captures 
the consumer when constructing each DedicatedFormatWriter, so an existing 
bucket keeps its original callback while newly opened buckets can use a 
replacement; both baseline Python and Java's 
BaseAppendFileStoreWrite.withBlobConsumer allow that behavior. It also breaks 
all six Python variants of the existing 
native_filtered_writer_configuration_test.py::test_filtered_blob_batches_allow_configuration_and_real_writes_capture_it
 after the first real write. They pass when only this setter is restored to the 
baseline version. Remove this guard and preserve the per-bucket capture 
behavior; the separate URI-reader-factory prewrite restriction should not be 
applied to the consumer setter.



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