jorisvandenbossche commented on code in PR #36846:
URL: https://github.com/apache/arrow/pull/36846#discussion_r1303213849
##########
python/pyarrow/types.pxi:
##########
@@ -3186,12 +3231,26 @@ def unify_schemas(schemas):
"""
cdef:
Schema schema
+ CField.CMergeOptions c_options
vector[shared_ptr[CSchema]] c_schemas
for schema in schemas:
if not isinstance(schema, Schema):
raise TypeError("Expected Schema, got {}".format(type(schema)))
c_schemas.push_back(pyarrow_unwrap_schema(schema))
- return pyarrow_wrap_schema(GetResultValue(UnifySchemas(c_schemas)))
+ if isinstance(options, str):
+ if options == "default":
+ c_options = CField.CMergeOptions.Defaults()
+ elif options == "permissive":
+ c_options = CField.CMergeOptions.Permissive()
+ else:
+ raise ValueError(f"Invalid merge option: {options}")
+
+ elif c_options:
Review Comment:
```suggestion
elif options:
```
--
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]