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


##########
paimon-python/pypaimon/utils/blob_view_lookup.py:
##########
@@ -139,6 +137,22 @@ def resolve_uri_reader(self, view_struct: BlobViewStruct) 
-> UriReader:
             )
         return uri_reader
 
+    def resolve_uri_reader_for_uri(self, uri: str) -> Optional[UriReader]:
+        """UriReader bound to the upstream table that produced this 
descriptor."""
+        return self._uri_reader_by_uri.get(uri)
+
+    def _store_chunk_results(self, descriptors, null_values):
+        self._descriptor_cache.update(descriptors)
+        self._null_value_cache.update(null_values)
+        for view_struct, descriptor in descriptors.items():
+            factory = self._uri_reader_factory_cache.get(
+                view_struct.identifier.get_full_name())
+            if factory is not None:
+                # from_file_io: HTTP(S) stays on HttpUriReader; other URIs
+                # reuse the upstream table FileIO (REST table token).
+                self._uri_reader_by_uri[descriptor.uri] = factory.create(

Review Comment:
   Thanks for catching this. Fixed the remaining reader-ownership issue by 
preserving the originating `BlobViewStruct` identity instead of collapsing 
readers into a URI-only mapping.
   
   Specifically:
   
   - `BlobViewLookup` now resolves each view through its source table’s 
`UriReaderFactory`.
   - The row path keeps the original `BlobViewStruct` until `get_blob()`, so 
the source-table association is not lost.
   - Inline materialization carries the resolved `BlobRef`, and concurrent 
reads honor each ref’s own reader, including HTTP(S).
   - Added a regression with two upstream table identifiers using different 
token-aware FileIOs but the same descriptor URI. Each row resolves through its 
own source FileIO, and the target table FileIO is not used.
   - Added coverage for HTTP serial/parallel materialization and related 
reader-metadata and compatibility cases.
   
   Verification:
   
   - BLOB/URI/REST/vector tests: `191 passed, 2 skipped`
   - Full `blob_table_test.py`: `90 passed, 1 skipped`



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