datafusion-contrib / datafusion-functions-json

JSON / JSONB support for DataFusion (unofficial)
https://crates.io/crates/datafusion-functions-json
Apache License 2.0
13 stars 5 forks source link

allow union input to `json_get` #17

Closed samuelcolvin closed 6 days ago

samuelcolvin commented 1 week ago

This allows queries of the form

select json_get(json_get(json_data, 'foo'), 0) from test

These cases could be simplified, but it'll be much harder/impossible to simplify use of json unions from CTEs or other parts of the query.

Note

The above query would be much more efficient if written:

select json_get(json_data, 'foo', 0) from test

cc @dmontagu