pitrou commented on code in PR #13033:
URL: https://github.com/apache/arrow/pull/13033#discussion_r863698934


##########
python/pyarrow/_dataset.pyx:
##########
@@ -783,11 +787,17 @@ cdef class FileFormat(_Weakrefable):
         if partition_expression is None:
             partition_expression = _true
 
-        c_source = _make_file_source(file, filesystem)
-        c_fragment = <shared_ptr[CFragment]> GetResultValue(
-            self.format.MakeFragment(move(c_source),
-                                     partition_expression.unwrap(),
-                                     <shared_ptr[CSchema]>nullptr))
+        cdef:
+            CFileSource c_source = _make_file_source(file, filesystem)
+            CResult[shared_ptr[CFileFragment]] c_result
+            CExpression c_partition_expression = partition_expression.unwrap()
+
+        with nogil:
+            c_result = self.format.MakeFragment(

Review Comment:
   If `MakeFragment` is self-contained and doesn't call into arbitrary IO code 
then it shouldn't be necessary.



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