rdblue commented on a change in pull request #4016:
URL: https://github.com/apache/iceberg/pull/4016#discussion_r800233141
##########
File path: python/src/iceberg/types.py
##########
@@ -48,27 +46,69 @@ def __str__(self):
@property
def is_primitive(self) -> bool:
- return self._is_primitive
+ return isinstance(self, PrimitiveType)
+
+class PrimitiveType(Type):
+ """Base class for all Iceberg Primitive Types"""
+
+ _implemented = {} # type: ignore
+
+ def __new__(cls):
Review comment:
I'd probably continue to use Singleton so that you don't have to call
`object.__new__` and can use `super().__new__` instead. That seems safer to me
for some reason.
--
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]