jun-he commented on code in PR #4727:
URL: https://github.com/apache/iceberg/pull/4727#discussion_r872648390
##########
python/src/iceberg/transforms.py:
##########
@@ -249,6 +249,32 @@ def result_type(self, source: IcebergType) -> IcebergType:
return StringType()
+class VoidTransform(Transform):
+ """A transform that always returns None"""
+
+ _instance = None
+
+ def __new__(cls):
+ if cls._instance is None:
+ cls._instance = super(VoidTransform, cls).__new__(cls)
+ return cls._instance
+
+ def __init__(self):
+ super().__init__("void", "transforms.always_null()")
+
+ def apply(self, value):
Review Comment:
Thanks for the comment. Updated.
--
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]