Skip to content

Commit

Permalink
Python: Return location and comments when parameter key does not exist (
Browse files Browse the repository at this point in the history
  • Loading branch information
ktk1012 authored Jul 10, 2023
1 parent d964700 commit f94de0f
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 f94de0f

Please sign in to comment.