gstvg commented on issue #6247: URL: https://github.com/apache/arrow-rs/issues/6247#issuecomment-2305387645
Hey @samuelcolvin, if I get it right, your first option looks like [union_extract from DuckDB.](https://duckdb.org/docs/sql/functions/union.html#union_extractunion-tag) [Example usage](https://shell.duckdb.org/#queries=v0,CREATE-TABLE-tbl1-(u-UNION(num-INTEGER%2C-str-VARCHAR))~%0AINSERT-INTO-tbl1-values-(1)%2C-('two')%2C-(union_value(str-%3A%3D-'three'))~,SELECT-union_extract(u%2C-'str')-AS-str%0AFROM-tbl1~) I'm trying to implement it at https://github.com/apache/datafusion/pull/12116 in case it helps -- 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