Skip to content

Commit

Permalink
pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jrouly committed Mar 4, 2024
1 parent b2aff44 commit 40c209d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pyiceberg/catalog/glue.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ def _register_glue_catalog_id_with_glue_client(glue: GlueClient, glue_catalog_id
"""
event_system = glue.meta.events

def add_glue_catalog_id(params, **kwargs) -> None: # type: ignore[no-untyped-def]
def add_glue_catalog_id(params: Dict[str, str], **kwargs: Any) -> None:
if "CatalogId" not in params:
params["CatalogId"] = glue_catalog_id

Expand All @@ -289,9 +289,8 @@ def __init__(self, name: str, **properties: Any):
)
self.glue: GlueClient = session.client("glue")

self.glue_catalog_id: Optional[str] = properties.get("glue.id")
if self.glue_catalog_id is not None:
_register_glue_catalog_id_with_glue_client(self.glue, self.glue_catalog_id)
if glue_catalog_id := properties.get(GLUE_ID):
_register_glue_catalog_id_with_glue_client(self.glue, glue_catalog_id)

def _convert_glue_to_iceberg(self, glue_table: TableTypeDef) -> Table:
properties: Properties = glue_table["Parameters"]
Expand Down

0 comments on commit 40c209d

Please sign in to comment.