sdf-jkl commented on PR #8354:
URL: https://github.com/apache/arrow-rs/pull/8354#issuecomment-3325668781

   Hey @scovich I see that your current implementation of 
`follow_shredded_path_element` for `VariantPathElement::Field` when following 
the shredded path is successful, it returns a 
`ShreddedPathStep::Success(field.shredding_state())` that holds a 
`ShreddingState::Typed` that holds a reference to the `typed_value` array. 
(That we later use for the next steps)
   
   My question is: does `ShreddedPathStep::Success()` necessarily have to 
require the input `ShreddingState` to be a reference?
   
   The reason I am asking is that since we use the output of 
`follow_shredded_path_element` to get the values from the shredded 
`VariantArray`, shouldn't we be free to drop the outer array once we extract 
the relevant `typed_value`?
   
   The only way to work with list arrays I came up with so far, is to build new 
arrays with `arrow_select::take`, combining the path index and 
`GenericListArray` offsets. 
   But by using this method we create new arrays within the scope of the 
function and can't use a reference to the array in the 
`ShreddedPathStep::Success`.
   
   Should we instead look for another way to represent a resulting array 
consisting of slices instead?


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