GoogleCloudPlatform / bigquery-utils

Useful scripts, udfs, views, and other utilities for migration and data warehouse operations in BigQuery.
https://cloud.google.com/bigquery/
Apache License 2.0
1.07k stars 269 forks source link

Fix JSON utilities for null/invalid input #333

Closed takegue closed 1 year ago

takegue commented 1 year ago

In BigQuery SQL function behavior,
function typically would return null for invalid arguments, not causing runtime error. JavaScript UDF currently does.

The difference is not useful for users because it gives users extra attention to use JavaScript UDFs

This PR fixes behavior of json_extract_keys, json_extract_values