optimise json_get(...) is null
to json_contains_not_null(...)
#28
Open
Description
We can't replace json_get(x, y) is null
with NOT json_contains(x, y)
because
select json_get('{"foo": null}', 'foo') is null -- true
select not json_contains('{"foo": null}', 'foo') -- false
-- or equivilantly
select json_get('{"foo": null}', 'foo') is not null -- false
select json_contains('{"foo": null}', 'foo') -- true
So we need a new method json_contains_not_null
which is true if the value exists in the JSON, but is not null
.
Then we can do the substitution.
Metadata
Assignees
Labels
No labels