tobixdev commented on PR #8829:
URL: https://github.com/apache/arrow-rs/pull/8829#issuecomment-3552236489

   > The only question I have is whether it's worth a test to make sure this 
works when printing nested lists and structs of extension types (I'm not sure 
exactly how the internals work to know if this takes a code path not covered 
here).
   
   @paleolimbot Great call! This wasn't working as the nested data types did 
not consider the factory in options.
   
   
https://github.com/apache/arrow-rs/pull/8829/commits/d494979c6bd0950db01bae2a50ca769975016cdd
   
   However, this is a again bigger change that will require a further review. 
Here are the changes:
   - Add `entries_fields` to map array for obtaining the (key, value) fields.
   - `make_array_formatter` utility function that either chooses the formatter 
from the factory or the default
   - Rename `make_formatter` -> `make_default_display_index` for distinguishing 
against the formatter
   - Rewrite `DisplayIndexState` for nested data structures to extract the field
   - Replace `Box<dyn DisplayIndex + 'a>` with `ArrayFormatter<'a>` in the 
nested formatters.
   - Replace `values.write(idx, f)?;` with `write!(f, "{}", 
values.value(idx))?` (this should consider the safe property of the formatters 
I think)
   - Tests (except for RunArray where I couldn't figure out how to create one 
with a custom field).


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