This is an automated email from the ASF dual-hosted git repository.

fokko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iceberg.git


The following commit(s) were added to refs/heads/master by this push:
     new f94de0f387 Python: Return location and comments when parameter key 
does not exist (#8014)
f94de0f387 is described below

commit f94de0f3872e24ae063a97db220fa63912e8c085
Author: Tae-kyeom, Kim <[email protected]>
AuthorDate: Mon Jul 10 22:52:20 2023 +0900

    Python: Return location and comments when parameter key does not exist 
(#8014)
---
 python/pyiceberg/catalog/glue.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/python/pyiceberg/catalog/glue.py b/python/pyiceberg/catalog/glue.py
index 1d5160dbaa..13ee7f81d6 100644
--- a/python/pyiceberg/catalog/glue.py
+++ b/python/pyiceberg/catalog/glue.py
@@ -444,10 +444,8 @@ class GlueCatalog(Catalog):
             raise NoSuchNamespaceError(f"Invalid input for namespace 
{database_name}") from e
 
         database = database_response[PROP_GLUE_DATABASE]
-        if PROP_GLUE_DATABASE_PARAMETERS not in database:
-            return {}
 
-        properties = dict(database[PROP_GLUE_DATABASE_PARAMETERS])
+        properties = dict(database.get(PROP_GLUE_DATABASE_PARAMETERS, {}))
         if database_location := database.get(PROP_GLUE_DATABASE_LOCATION):
             properties[LOCATION] = database_location
         if database_description := 
database.get(PROP_GLUE_DATABASE_DESCRIPTION):

Reply via email to