smaheshwar-pltr commented on PR #2178:
URL: https://github.com/apache/iceberg-python/pull/2178#issuecomment-3058666929

   After some thought, we can maybe narrow down to a few approaches:
   1. Inspect constructor of subclass and match attribute names to parameter 
names; I've implemented this here now 
([9edb166](https://github.com/apache/iceberg-python/pull/2178/commits/9edb1660f6d4a576ae15066e9f7cc7d1760007cc)),
 in the spirit of 
https://github.com/apache/iceberg-python/pull/2178#issuecomment-3057713704
   2. Lift the attribute name matching assumption by introducing a separate 
`arguments` property that subclasses can override: 
https://github.com/apache/iceberg-python/pull/2199
   3. Use `**kwargs` as in 
https://github.com/apache/iceberg-python/pull/2178#issuecomment-3046566095 so 
the constructor ignores unrecognised arguments
   4. Spitballing: a larger change to the design to make `update` more fluid 
(when reading the code my mind goes to 
https://docs.python.org/3/library/dataclasses.html#dataclasses.replace), though 
might be hard and even harder to do so in a non-breaking way.
   
   @kevinjqliu @jayceslesar, happy to take suggestions / hear thoughts! The 
first three work; I'm leaning towards (1) currently.


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