Fokko commented on code in PR #5011:
URL: https://github.com/apache/iceberg/pull/5011#discussion_r907410714


##########
python/src/iceberg/types.py:
##########
@@ -59,134 +62,176 @@ class IcebergType:
         'IcebergType()'
     """
 
-    @property
-    def string_type(self) -> str:
-        return self.__repr__()
-
-    def __str__(self) -> str:
-        return self.string_type
+    @classmethod
+    def __get_validators__(cls):
+        # one or more validators may be yielded which will be called in the
+        # order to validate the input, each validator will receive as an input
+        # the value returned from the previous validator
+        yield cls.validate
+
+    @classmethod
+    def validate(cls, v):

Review Comment:
   But then we're still parsing in the validate method, but returning a `dict` 
that describes the `FixedType` instead of an instantiated `FixedType`. Let me 
check if there is an alternative way to implement this other than a validator.



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