rchowell opened a new pull request, #1920:
URL: https://github.com/apache/iceberg-python/pull/1920

   Closes #1910 
   
   # Rationale for this change
   
   When working with the GlueCatalog, I may already have a GlueClient that I've 
instantiated from elsewhere, and perhaps wish to keep. This allows passing our 
client to the GlueCatalog constructor so that we aren't forced into getting a 
new client.
   
   This is slightly interesting because it's the only catalog that now has a 
different constructor signature. Also it may be odd for users to pass a client, 
but then none of their properties (which may have retry configs) are applied.
   
   An alternative to consider is having a `from_client` or `with_client` 
staticmethod, but I did not see precedence elsewhere. I will leave it to the 
maintainers to decide which they prefer and will update accordingly. Similarly, 
I can do the same for dynamodb 🙂 
   
   I've also skipped the event_handler for a user-provided client because I 
wouldn't want to impede on their existing events, also the param is optional. 
Something to consider is using the [unique_id 
arg](https://github.com/boto/botocore/blob/aaa6690e45c8dabcde3a8d2d1aa34b5fd399fba7/botocore/hooks.py#L89)
 when registering an event. 
   
   > If a ``unique_id`` is given, the handler will not be registered
   > if a handler with the ``unique_id`` has already been registered.
   
   
   # Are these changes tested?
   
   Basic unit test to assert the client passed is the client used.
   
   # Are there any user-facing changes?
   
   I believe so since this is an addition to the public API.
   


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