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


##########
paimon-python/pypaimon/execution/python/write/file_store_write.py:
##########
@@ -127,27 +131,32 @@ def write_row(
         require_columns(values_by_name, column_names, 'write_row')
         writer = self.data_writers.get(key)
         data = None
-        if writer is None and self._has_blob_columns():
-            # Dedicated writers consume live payloads themselves. Inline fields
-            # instead encode to Arrow before the writer captures its layout.
-            descriptor_fields = self.options.blob_descriptor_fields()
-            view_fields = self.options.blob_view_fields()
+        if self._has_blob_columns():
+            descriptor_fields = 
CoreOptions.blob_descriptor_fields(self.options)
+            view_fields = CoreOptions.blob_view_fields(self.options)
             inline_columns = [name for name in column_names if name in 
descriptor_fields or name in view_fields]
             if inline_columns:
                 values_by_name = dict(values_by_name)
                 for name in inline_columns:
                     values_by_name[name] = inline_blob_value(
                         values_by_name[name], name in descriptor_fields, name 
in view_fields)

Review Comment:
   @JingsongLi Thanks for catching this! Fixed in commit `c713303`:
   
       1. Extracted `normalize_inline_blob_row` in 
`pypaimon/write/row_utils.py` and shared it between 
`PythonPostponeFixedBucketWrite.write_row` (before `row_values_to_arrow_table` 
when sizing/buffering a new partition) and `FileStoreWrite.write_row`.
       2. Added 
`test_postpone_fixed_bucket_pk_inline_blob_write_row_new_partition` in 
`blob_table_test.py` covering the first `write_row` into new unplanned 
partitions for
     both `blob-descriptor-field` (`Blob.from_descriptor_bytes`) and 
`blob-view-field` (`Blob.from_view`) with automatic bucket planning.



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