Here I've tried to achieve the same behaviour of predicates like postgres has:
Selecting the result of the predicate path from json should return the predicate result itself, so Selector::select returns true or false in jsonb format;
json_path_exists always returns true on predicates, because selector always has the result on it (true or false)
path_match
function (supporting@@
andjson_path_match
for https://github.com/datafuselabs/databend/issues/11270);Here I've tried to achieve the same behaviour of predicates like postgres has:
Selector::select
returnstrue
orfalse
in jsonb format;json_path_exists
always returnstrue
on predicates, because selector always has the result on it (true
orfalse
)@
is forbidden in predicate expression;I've found the good explanation here https://justatheory.com/2023/10/sql-jsonpath-operators/