evidence-dev / sqltools-bigquery-driver

Query and Explore BigQuery from VSCode
https://marketplace.visualstudio.com/items?itemName=Evidence.sqltools-bigquery-driver
MIT License
40 stars 5 forks source link

Wrong output with JSON function #25

Closed cdevacc1 closed 1 month ago

cdevacc1 commented 2 months ago

SELECT JSON_KEYS(JSON '{"a": {"b":1}}', 1) AS json_keys

The query above return Null. It should return 'a'

archiewood commented 1 month ago

The problem here appears to be that ARRAY result types are not handled correctly: JSON_KEYS has a return type of ARRAY<string>

This can be reproduced by:

SELECT GENERATE_ARRAY(1, 5) AS example_array