sfc-gh-pfus commented on issue #41284:
URL: https://github.com/apache/arrow/issues/41284#issuecomment-2066729196

   @zeroshade Sorry, I misunderstood your example! This is great. Are there 
similar functions for creating lists and maps? You probably know the topic in 
snowflake driver :) We have use case like this:
   1. Snowflake returns data in arrow arrays (strings, ints etc). We have arrow 
batches API which returns this data to client.
   2. In many cases we return these arrays as-is, but sometimes we have to make 
some conversions, for instance pruning decimal128 to int64 or convert 
two-fielded struct representing timestamp into arrow Timestamp.
   3. Now, we introduce structured objects, lists and maps. So instead of array 
of "primitives" we have arrow arrays of complex structures, like structs 
(various types), lists of specific types or maps. But still we need to apply 
the same conversion schema (like pruning decimal to int64) for each "internal" 
field.
   
   API you presented is great for structs. Is there anything similar for lists 
and maps? So for each field in struct:
   ```
   newArr := convertFunction(origArr)
   ```
   And I can apply it to all arrays in struct and build a struct from it using 
`array.NewStructArray`. Is there something like this so I can use it in:
   
   ```
   newListArr := convertFunction(listArr.ListValues())
   newKeyArr := convertFunction(mapArr.Keys())
   newValueArr := convertFunction(mapArr.Items())
   ```
   And build new list/map?


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