syun64 commented on code in PR #512:
URL: https://github.com/apache/iceberg-python/pull/512#discussion_r1519661896


##########
pyiceberg/catalog/__init__.py:
##########
@@ -646,6 +646,13 @@ def purge_table(self, identifier: Union[str, Identifier]) 
-> None:
         delete_files(io, prev_metadata_files, PREVIOUS_METADATA)
         delete_files(io, {table.metadata_location}, METADATA)
 
+    def table_exists(self, identifier: Union[str, Identifier]) -> bool:

Review Comment:
   Hi @anupam-saini This looks great! In addition to this default behavior, I 
think there is a suggestion on #507 to override this method in 
[catalog/rest.py](https://github.com/apache/iceberg-python/blob/pyiceberg-0.6.x/pyiceberg/catalog/rest.py)
 to instead make a head request to the Rest Catalog at 
[/v1/{prefix}/namespaces/{namespace}/tables/{table}](https://github.com/apache/iceberg/blob/main/open-api/rest-catalog-open-api.yaml#L814)
 endpoint. Shall we incorporate that suggestion to use the available endpoint 
in the Rest Catalog?



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