Skip to content

Commit

Permalink
Follow location and comments from glue even parameter key does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
ktk1012 committed Jul 8, 2023
1 parent 623b9b7 commit 21ebcbd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions python/pyiceberg/catalog/glue.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,10 +444,8 @@ def load_namespace_properties(self, namespace: Union[str, Identifier]) -> Proper
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):
Expand Down

0 comments on commit 21ebcbd

Please sign in to comment.