Stephen0421 commented on code in PR #9148:
URL: https://github.com/apache/paimon/pull/9148#discussion_r3757652962


##########
paimon-python/pypaimon/read/reader/field_indices.py:
##########
@@ -29,6 +29,23 @@ def blob_field_indices(fields: List[DataField]) -> Set[int]:
     }
 
 
+def descriptor_field_indices(
+        fields: List[DataField], descriptor_field_names: Iterable[str]) -> 
Set[int]:
+    names = set(descriptor_field_names)
+    if not names:
+        return set()
+    return {i for i, f in enumerate(fields) if f.name in names}
+
+
+def descriptor_field_indices_for_table(table, fields: List[DataField]) -> 
Set[int]:
+    from pypaimon.common.options.core_options import CoreOptions
+
+    if not CoreOptions.blob_as_descriptor(table.options):
+        return set()
+    return descriptor_field_indices(

Review Comment:
   Thanks for catching this. Fixed in the latest push:
   
   - When `blob-as-descriptor=true`, resolved `blob-view-field` columns are now 
included in descriptor routing, so `OffsetRow.get_blob()` returns `BlobRef` 
instead of `BlobData`.
   - `BlobDescriptor.serialize()` now always writes v2 + magic (aligned with 
Java), so v1 descriptors re-serialized by `BlobInlineConvertReader` are 
unambiguous.
   
   Added `test_offset_row_get_blob_v1_resolved_blob_view_field` plus 
routing/serialize coverage.



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