You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Variant] Support safe cast option for json_to_variant #11775
Is your feature request related to a problem or challenge?
json_to_variant fails the entire batch when a row contains invalid JSON. Implementing try_parse_json downstream requires returning SQL NULL for that row while preserving valid rows.
Describe the solution you'd like
Add a required CastOptions argument to json_to_variant, following the error policy used by variant_get:
safe: true: return SQL NULL for rows that fail to parse.
safe: false: return an error.
Callers can pass safe: false for strict parsing or safe: true for try parsing. Preserve input SQL NULLs and keep JSON null as a Variant null. Unsupported input types should still return an error.
Activity