spenczar opened a new pull request, #38334: URL: https://github.com/apache/arrow/pull/38334
### Rationale for this change Previously, pyarrow.StructArray.from_arrays would fail on certain types of input. When it receives a non-pyarrow data array, it would first infer the type of the input data, and _then_ apply the user-input type from the constructor, which can fail when casting. Instead, proactively use the field type information provided. ### What changes are included in this PR? Changes to StructArray.from_arrays to use field type info, and a bit more test coverage for that case. ### Are these changes tested? Yes ### Are there any user-facing changes? Yes: Since StructArray.from_arrays uses `asarray` under the hood, it will now cast the inputs to match the Struct fields provided, if inputs are PyArrow arrays already. This seems like an improvement, to me, but it is a change in behavior. -- 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]
