smaheshwar-pltr commented on code in PR #2178:
URL: https://github.com/apache/iceberg-python/pull/2178#discussion_r2216644236
##########
pyiceberg/table/__init__.py:
##########
@@ -1691,7 +1691,12 @@ def to_polars(self) -> pl.DataFrame: ...
def update(self: S, **overrides: Any) -> S:
"""Create a copy of this table scan with updated fields."""
- return type(self)(**{**self.__dict__, **overrides})
+ from inspect import signature
+
+ params = signature(type(self).__init__).parameters.keys() - {"self"}
# Skip "self" parameter
+ kwargs = {param: getattr(self, param) for param in params} # Assume
parameters are attributes
Review Comment:
Good point! 776c4335
--
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]