jorisvandenbossche commented on issue #40053:
URL: https://github.com/apache/arrow/issues/40053#issuecomment-1948009700

   > Are you referring to [this 
function](https://github.com/apache/arrow/blob/bbe59b35de33a0534fc76c9617aa4746031ce16c/python/pyarrow/src/arrow/python/inference.cc#L628-L660)?
   
   Yes, and then the `struct_inferrers_` gets converted to the struct type 
here: 
   
   
https://github.com/apache/arrow/blob/bbe59b35de33a0534fc76c9617aa4746031ce16c/python/pyarrow/src/arrow/python/inference.cc#L668-L676
   
   
   > Could the shuffling be due to the use of `struct_inferrers_.insert()`, 
where `struct_inferrers_` is a `std::map<std::string, TypeInferrer>`, so it 
doesn't preserve order?
   
   Good catch! Indeed, a map will sort the keys. If we want to preserve the 
order of the dict keys, we will have to use a different data structure (or keep 
track of the order separately)


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