jgehrcke commented on code in PR #15049:
URL: https://github.com/apache/arrow/pull/15049#discussion_r1055388356


##########
python/pyarrow/_dataset.pyx:
##########
@@ -775,6 +775,14 @@ cdef class FileWriteOptions(_Weakrefable):
 
     @staticmethod
     cdef wrap(const shared_ptr[CFileWriteOptions]& sp):
+
+        if sp.get() == nullptr:
+            # DefaultWriteOptions() may return `nullptr` which means that
+            # the format does not yet support writing datasets.
+            raise NotImplementedError(
+                "Writing datasets not yet implemented for this file format."
+            )

Review Comment:
   @kou I agree, now also seeing this very clearly :).



##########
python/pyarrow/_dataset.pyx:
##########
@@ -775,6 +775,14 @@ cdef class FileWriteOptions(_Weakrefable):
 
     @staticmethod
     cdef wrap(const shared_ptr[CFileWriteOptions]& sp):
+
+        if sp.get() == nullptr:
+            # DefaultWriteOptions() may return `nullptr` which means that
+            # the format does not yet support writing datasets.
+            raise NotImplementedError(
+                "Writing datasets not yet implemented for this file format."
+            )

Review Comment:
   @kou I agree, now also seeing this very clearly :). Adding a commit.



-- 
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]

Reply via email to