kbendick commented on code in PR #4797:
URL: https://github.com/apache/iceberg/pull/4797#discussion_r875372781


##########
python/src/iceberg/types.py:
##########
@@ -208,6 +208,10 @@ def __init__(self, *fields: NestedField, **kwargs):
             fields = kwargs["fields"]
         object.__setattr__(self, "fields", fields)
 
+    # This __post_init__ call is needed as IcebergType is not a dataclass
+    def __post_init__(self):
+        super().__init__()

Review Comment:
   Yes, I believe that interferes with setting this to a frozen dataclass.
   
   See this SO (the answer at the bottom): 
https://stackoverflow.com/questions/66827839/super-classs-init-is-not-called-using-dataclass
   
   As well as this example: https://github.com/ericvsmith/dataclasses/issues/142



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