Fokko commented on code in PR #1345: URL: https://github.com/apache/iceberg-python/pull/1345#discussion_r1917829595
########## pyiceberg/transforms.py: ########## @@ -193,6 +195,24 @@ def supports_pyarrow_transform(self) -> bool: @abstractmethod def pyarrow_transform(self, source: IcebergType) -> "Callable[[pa.Array], pa.Array]": ... + def _pyiceberg_transform_wrapper( + self, transform_func: Callable[["ArrayLike", Any], "ArrayLike"], *args: Any + ) -> Callable[["ArrayLike"], "ArrayLike"]: + import pyarrow as pa Review Comment: ```suggestion try: import pyarrow as pa except ModuleNotFoundError as e: raise ModuleNotFoundError("For bucket/truncate transforms, PyArrow needs to be installed") from e ``` -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org