Closed dion-gdn closed 4 months ago
This happens because we were missing one language feature (FEATURE_JSON_MUTATOR_FUNCTIONS) that needed to be enabled in the BigQueryLanguageOptions
. I added it in c331a1c7fbdab78e72631ffc9bb29b0604bc54fe, it will be released with version 0.5.3
in a few days.
In the meantime, here's a small code snippet you can use to manually enable the feature on previous versions. Be sure to do this before creating your BigQueryCatalog
.
// Do this before creating your BigQueryCatalog
BigQueryLanguageOptions.get()
.enableLanguageFeature(LanguageFeature.FEATURE_JSON_MUTATOR_FUNCTIONS);
Edited my previous comment with a much easier workaround.
Hi,
I got this error:
com.google.zetasql.toolkit.AnalysisException: Function not found: JSON_STRIP_NULLS [at 47:22]
I think it was caused by invalid arguments:
com.google.zetasql.io.grpc.StatusRuntimeException: INVALID_ARGUMENT: Function not found: JSON_STRIP_NULLS [at 47:22]
Here's a sample of the query I used:
Where
payload
data type isSTRING
but contains JSON data. For some reason ZetaSQL throwsINVALID_ARGUMENT
. I did check the ZetaSQL C++ code but I don't understand what's wrong.Any insights into what's causing the error? Thanks