HonahX commented on code in PR #703:
URL: https://github.com/apache/iceberg-python/pull/703#discussion_r1591831561
##########
pyiceberg/transforms.py:
##########
@@ -349,6 +356,13 @@ def dedup_name(self) -> str:
def preserves_order(self) -> bool:
return True
+ @abstractmethod
+ def pyarrow_transform(self, source: IcebergType) -> "Callable[[pa.Array],
pa.Array]": ...
+
+ @property
+ def supports_pyarrow_transform(self) -> bool:
Review Comment:
Instead of adding a public method, how about we maintaining a private list
of transform that supports pyarrow transform for the check at the beginning of
`append`. For transforms that does not yet support pyarrow transform, we could
throw `NotImplementedError` in `pyarrow_transform`
WDYT!
##########
pyiceberg/transforms.py:
##########
@@ -349,6 +356,13 @@ def dedup_name(self) -> str:
def preserves_order(self) -> bool:
return True
+ @abstractmethod
+ def pyarrow_transform(self, source: IcebergType) -> "Callable[[pa.Array],
pa.Array]": ...
+
+ @property
+ def supports_pyarrow_transform(self) -> bool:
Review Comment:
Instead of adding a public method, how about we maintaining a private list
of transform that supports pyarrow transform for the check at the beginning of
`append`. For transforms that does not yet support pyarrow transform, we could
throw `NotImplementedError` in `pyarrow_transform`
WDYT?
--
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]