Fokko commented on code in PR #36846:
URL: https://github.com/apache/arrow/pull/36846#discussion_r1274924599


##########
python/pyarrow/types.pxi:
##########
@@ -1969,6 +1969,33 @@ cpdef KeyValueMetadata ensure_metadata(object meta, 
c_bool allow_none=False):
         return KeyValueMetadata(meta)
 
 
+cdef class FieldMergeOptions(_Weakrefable):
+    """
+    Options controlling how to merge the types of two fields.
+
+    By default, types must match exactly, except the null type can be
+    merged with any other type.
+
+    """
+
+    cdef:
+        CField.CMergeOptions c_options
+
+    __slots__ = ()
+
+    def __init__(self, *):
+        self.c_options = CField.CMergeOptions.Defaults()
+
+    @staticmethod
+    def permissive():
+        """
+        Allow merging generally compatible types (e.g. float64 and int64).
+        """
+        cdef FieldMergeOptions options = FieldMergeOptions()
+        options.c_options = CField.CMergeOptions.Permissive()
+        return options

Review Comment:
   That's a great suggestion



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