edponce commented on a change in pull request #11147:
URL: https://github.com/apache/arrow/pull/11147#discussion_r713549002



##########
File path: python/pyarrow/_compute.pyx
##########
@@ -904,59 +885,71 @@ class TakeOptions(_TakeOptions):
 
 
 cdef class _PartitionNthOptions(FunctionOptions):
-    def _set_options(self, int64_t pivot):
+    def _set_options(self, pivot):
         self.wrapped.reset(new CPartitionNthOptions(pivot))
 
 
 class PartitionNthOptions(_PartitionNthOptions):
-    def __init__(self, int64_t pivot):
+    def __init__(self, pivot):
         self._set_options(pivot)
 
 
 cdef class _MakeStructOptions(FunctionOptions):
-    def _set_options(self, field_names):
+    def _set_options(self, field_names, field_nullability, field_metadata):
         cdef:
             vector[c_string] c_field_names
-        for n in field_names:
-            c_field_names.push_back(tobytes(n))
-        self.wrapped.reset(new CMakeStructOptions(c_field_names))
+            vector[shared_ptr[const CKeyValueMetadata]] c_field_metadata
+        for name in field_names:
+            c_field_names.push_back(tobytes(name))
+        for metadata in field_metadata:
+            c_field_metadata.push_back(pyarrow_unwrap_metadata(metadata))
+        self.wrapped.reset(
+            new CMakeStructOptions(c_field_names,
+                                   field_nullability,
+                                   c_field_metadata))
 
 
 class MakeStructOptions(_MakeStructOptions):
-    def __init__(self, field_names):
-        self._set_options(field_names)
+    def __init__(self, field_names, field_nullability=None,

Review comment:
       Oops, I now noticed that `MakeStructOptions` does have constructor with 
only the first parameter (`field_names`). I applied the suggested change 
(keyword-only for optional parameters).




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