mnzpk commented on code in PR #1747:
URL: https://github.com/apache/iceberg-python/pull/1747#discussion_r1976524834


##########
pyiceberg/catalog/hive.py:
##########
@@ -167,6 +167,10 @@ def _init_thrift_client(self) -> None:
         self._client = Client(protocol)
 
     def __enter__(self) -> Client:
+        # If the transport is closed, reinitialize it
+        if not self._transport.isOpen():
+            self._init_thrift_client()
+
         self._transport.open()

Review Comment:
   Should this line be moved under the guard too since in the case that the 
transport is actually open, calling `open` on it would still yield the reported 
error?



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to