Add `union_extract` function
Is your feature request related to a problem or challenge?
Retrieve the value of the given union variant, or NULL if it's not currently selected
Describe the solution you'd like
No response
Describe alternatives you've considered
No response
Additional context
DuckDB has such function, I propose using the same name https://duckdb.org/docs/sql/functions/nested.html#union_extractunion-tag
take
Hi @gstvg!
I have a question regarding this issue. We are currently working on a prototype that would require "ergonomic" handling of unions for filtering etc. I understand that you have implemented a union_extract kernel in arrow-rs. Is there a reason on why the API of using this kernel wasn't merged into DataFusion? Or is there already another way to achieve the semantics of extract_union?
I'd also be happy to give a hand if there's something that I could do.
Hi @tobixdev
My bad, the arrow kernel ended up being enough for me and I got busy with other work, leaving this for later. I'm already started updating #12116, I should push it soon. I'll ping you there in case you wanna take a look
The duckdb naming is unfortunate, so easy to confuse with sql union.