jamesbornholt commented on code in PR #3058:
URL: https://github.com/apache/iceberg-python/pull/3058#discussion_r2823761193


##########
pyiceberg/catalog/glue.py:
##########
@@ -417,6 +420,110 @@ def _get_glue_table(self, database_name: str, table_name: 
str) -> "TableTypeDef"
         except self.glue.exceptions.EntityNotFoundException as e:
             raise NoSuchTableError(f"Table does not exist: 
{database_name}.{table_name}") from e
 
+    def _is_s3tables_database(self, database_name: str) -> bool:
+        """Check if a Glue database is federated with S3 Tables.
+
+        S3 Tables databases have a FederatedDatabase property with
+        ConnectionType set to aws:s3tables.
+
+        Args:
+            database_name: The name of the Glue database.
+
+        Returns:
+            True if the database is an S3 Tables federated database.
+        """
+        try:
+            database_response = self.glue.get_database(Name=database_name)
+        except self.glue.exceptions.EntityNotFoundException:
+            return False
+        database = database_response["Database"]
+        federated = database.get("FederatedDatabase", {})
+        return (federated.get("ConnectionType") or "").lower() == 
"aws:s3tables"
+
+    def _create_table_s3tables(
+        self,
+        identifier: str | Identifier,

Review Comment:
   yep, done



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to