scovich commented on PR #7946: URL: https://github.com/apache/arrow-rs/pull/7946#issuecomment-3105465285
> convenience functions to streamline interacting with Variants seem to be absent as well. Is there an interest in implementing traits for Variants like Index/IndexMut? I'm happy to take either of these efforts. Problem is, those traits return references (which the compiler then transparently dereferences). AFAIK, it's impossible to implement those traits if the return value is "manufactured" by the function call itself, because that would require returning a reference to a temporary object that goes out of scope as soon as the function returns. ... which is why we have `Index` for `VariantMetadata` (which _does_ return a reference to an underlying string entry), but not for `Variant` -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org