timsaucer opened a new issue, #41833:
URL: https://github.com/apache/arrow/issues/41833

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   When creating an array from a python dict, field entries of a null struct 
are initialized with default values rather than null even if their field is 
nullable. In the minimal example below, you would expect the 3rd row to have 
values of `inner_1` and `inner_2` to be null.
   
   ```
   import pyarrow as pa
   
   print(pa.array([
       {"outer": {"inner_1": 1, "inner_2": 2}},
       {"outer": {"inner_1": 3, "inner_2": None}},
       {"outer": None},
   ]))
   ```
   
   Generates the following output:
   
   ```
   -- is_valid: all not null
   -- child 0 type: struct<inner_1: int64, inner_2: int64>
     -- is_valid:
         [
         true,
         true,
         false
       ]
     -- child 0 type: int64
       [
         1,
         3,
         0
       ]
     -- child 1 type: int64
       [
         2,
         null,
         0
       ]
   ```
   
   ### Component(s)
   
   Python


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