zhuqi-lucas opened a new issue, #9523:
URL: https://github.com/apache/arrow-rs/issues/9523

   **Describe the bug**
   `Field::try_merge` correctly handles `DataType::Null` for primitive types
   and when `self` is Null, but fails when `self` is a compound type (Struct,
   List, LargeList, Union) and `from` is Null. This causes `Schema::try_merge`
   to error when merging schemas where one has a Null field and another has a
   concrete compound type for the same field.
   
   This is common in JSON inference where some files have `null` values for
   fields that are structs/lists in other files.
   
   
   **To Reproduce**
   <!--
   Steps to reproduce the behavior:
   -->
   
   **Expected behavior**
   Add `DataType::Null` arms to the Struct, List, LargeList, and Union
   branches in `Field::try_merge`, consistent with how primitive types
   already handle it.
   
   **Additional context**
   <!--
   Add any other context about the problem here.
   -->


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