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

Looking up JSON using more than 1 array doesn't work #23

Open samuelcolvin opened 5 days ago

samuelcolvin commented 5 days ago

E.g. queries like

select json_get(more_nested.json_data, more_nested.str_key1, more_nested.str_key2) v from more_nested

As of #22 this will return an error instead of silently only using the first array, but in theory we could fully support this.

samuelcolvin commented 5 days ago

You can work around this already by doing

select json_get(json_get(more_nested.json_data, more_nested.str_key1), more_nested.str_key2) v from more_nested

The automatic un-nesting added in #25 doesn't unnest this case.