Skip to content

Commit 552cfcb

Browse files
craig[bot]ZhouXing19
andcommitted
Merge #150793
150793: sql/jsonpath: index accelerate jsonb_path_exists filters r=ZhouXing19 a=ZhouXing19 Fixes: #154044 This commit is to generate inverted expression for filter (i.e. WHERE clauses) with the `jsonb_path_exists` function. Release note (sql change): We now support index acceleration for a subset of jsonb_path_exists filters. Given the `jsonb_path_exists(json_obj, json_path_expression)`, we only support inverted index for json_path_expression that matches one of the following patterns: - The json_path_expression must NOT be in STRICT mode. - keychain mode: `$.[key|wildcard].[key|wildcard]...` - For this mode, we will generate a prefix span for the inverted expression. - filter with end value mode, with equality check: `$.[key|wildcard]? (`@.[key|wildcard].[key|wildcard]...` == [string|number|null|boolean])` - For this mode, since the end value is fixed, we will generate a single value span. Specifically, we don't support the following edge case: - `$` - `$[*]` - `$.a.b.c == 12` or `$.a.b.c > 12` or `$.a.b.c < 12` (operation expression) - `$.a.b ? (`@.a` > 10)` (filter, with inequality check) Note that the cases we support is to use `jsonb_path_exists` in filters, as in, when they are used in the WHERE clause. Co-authored-by: ZhouXing19 <[email protected]>
2 parents 84b4b91 + 7ddbf29 commit 552cfcb

File tree

23 files changed

+1574
-25
lines changed

23 files changed

+1574
-25
lines changed

pkg/ccl/logictestccl/tests/3node-tenant/generated_test.go

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/ccl/logictestccl/tests/local-read-committed/generated_test.go

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/ccl/logictestccl/tests/local-repeatable-read/generated_test.go

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)