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

   In the review of #50327 it was noted 
(https://github.com/apache/arrow/pull/50327#discussion_r3629728508) that the 
bulk conversion does not consult a user-defined `to_pylist` override on 
`ExtensionArray` subclasses for *nested* children.
   
   This was already inconsistent before #50327:
   - `ListScalar.as_py` called `child_values.to_pylist()`, so an override on a 
list child's class was honored;
   - `StructScalar.as_py` converted fields via per-element Scalars, so an 
override on a struct child's class was ignored.
   
   Top-level overrides dispatch normally through Python method resolution in 
both the old and the new code, and `ExtensionScalar.as_py` / 
`__arrow_ext_scalar_class__` — the documented customization point — is honored 
on all paths.
   
   This issue is to decide the contract:
   1. document that nested `to_pylist` overrides are not consulted (only 
`ExtensionScalar.as_py` is), or
   2. detect custom `to_pylist` overrides and route nested conversion through 
them (sketch in the linked discussion).
   
   This pull request and its description were written by Isaac.


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