HonahX commented on code in PR #703:
URL: https://github.com/apache/iceberg-python/pull/703#discussion_r1591829611


##########
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]": ...

Review Comment:
   Shall we put this in the super class `Transform`, in the future we will 
support all the transforms and they will share the same method def for this



##########
Makefile:
##########
@@ -43,7 +43,7 @@ test-integration:
        sleep 10
        docker compose -f dev/docker-compose-integration.yml cp 
./dev/provision.py spark-iceberg:/opt/spark/provision.py
        docker compose -f dev/docker-compose-integration.yml exec -T 
spark-iceberg ipython ./provision.py
-       poetry run pytest tests/ -v -m integration ${PYTEST_ARGS}
+       poetry run pytest 
tests/integration/test_writes/test_partitioned_writes.py -v -m integration 
${PYTEST_ARGS}

Review Comment:
   [nit] This seems a temp change for testing. Could you please revert it? :)



##########
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 a 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: 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

Reply via email to