I ended up making the changes needed on my side, and made a corresponding pull request at https://github.com/apache/arrow/pull/13737. Feel free to comment. [https://opengraph.githubassets.com/9785ecdef3889fd9e28046b5e8a6cc4456efef233665fb3bdeeeef621efbb0ff/apache/arrow/pull/13737]<https://github.com/apache/arrow/pull/13737> Add scalar casts to string types for list based types by LouisClt · Pull Request #13737 · apache/arrow<https://github.com/apache/arrow/pull/13737> Following https://lists.apache.org/thread/rp7vpjtt4lgtjxj35oyjyqh9b6on94jf discussion, here is the PR corresponding to the feature : be able to cast list-like types (maps, lists, fixed-size lists) ... github.com
________________________________ De : Louis C <[email protected]> Envoyé : jeudi 28 juillet 2022 09:13 À : [email protected] <[email protected]> Objet : RE: [C++] Scalar cast of MAP and LIST to STRING Hello Wes, Thanks for your answer, I may look into it if I find time to do it then. Best regards, Louis ________________________________ De : Wes McKinney <[email protected]> Envoyé : mercredi 27 juillet 2022 18:41 À : [email protected] <[email protected]> Objet : Re: [C++] Scalar cast of MAP and LIST to STRING hi Louis -- it's hard to say. Since this project is developed by volunteers, the issue would generally be completed by someone who needs the feature. If you would like to try to submit a PR for this, it may not be a large amount of work to implement. - Wes On Wed, Jul 27, 2022 at 7:47 AM Louis C <[email protected]> wrote: > > Hello, > > Thanks for you answer and support. Do you have any rough idea when this will > be available ? > > Thanks > Louis > ________________________________ > De : David Li <[email protected]> > Envoyé : mardi 26 juillet 2022 17:22 > À : dl <[email protected]> > Objet : Re: [C++] Scalar cast of MAP and LIST to STRING > > Hi Louis, > > It just happens they aren't implemented, I don't think there's any particular > reason. I've filed ARROW-17214 [1] to track this. > > [1]: https://issues.apache.org/jira/browse/ARROW-17214 > > -David > > On Tue, Jul 26, 2022, at 05:19, Louis C wrote: > > Hello, > > I use scalar casts to STRING type as a way to represent easily the more > complex arrow types such as STRUCT or UNION. For these types, the Scalar cast > (CastTo method) is correctly implemented, giving results such as :"union{1: > bool = false}" > However, when casting LIST, LARGE_LIST or MAP types, it gives NotImplemented > error. > Is there a particular reason why it is the case ? > Is it planned to make it work ? > > Best regards > Louis C > >
