XiaoHongbo-Hope commented on code in PR #7009:
URL: https://github.com/apache/paimon/pull/7009#discussion_r2681526100


##########
paimon-python/pypaimon/common/file_io.py:
##########
@@ -43,7 +43,7 @@ def __init__(self, path: str, catalog_options: Options):
         self.properties = catalog_options
         self.logger = logging.getLogger(__name__)
         scheme, netloc, _ = self.parse_location(path)
-        self.uri_reader_factory = UriReaderFactory(catalog_options)
+        self.uri_reader_factory = UriReaderFactory(catalog_options.copy())

Review Comment:
   > Why do we need copy? What logic would update it?
   
   When using REST catalog with blob-as-descriptor, we have two FileIO 
instances:
   1. Table FileIO (RESTTokenFileIO) - uses REST data token
   2. External OSS blob files - uses user OSS credentials
   
   RESTTokenFileIO updates catalog_options dynamically in _initialize_oss_fs() 
when refreshing token. This would pollute the blob reader's configuration. So 
try to use a copy of catalog options in uri_reader_factory.
   
   Java: Token updates in RESTTokenFileIO.fileIO() create a new Options object.
   
   Updated this info in PR description too.



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