cockroachdb / cockroachdb/cockroach

sql/jsonpath: expand jsonb_path_exists index acceleration support

Open
#155,983 0 comments 0 reactions 0 assignees View on GitHub
C-enhancement T-sql-queries
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

Currently, index acceleration for jsonb_path_exists filters only supports a limited subset of JSONPath expressions (non-strict mode, simple keychains, and equality-based filters with fixed end values) (#150793). This issue tracks the work to extend support to a broader range of JSONPath patterns.

Broader support would enable more queries using jsonb_path_exists to benefit from inverted index acceleration, improving performance for complex JSON queries.

Proposed areas to explore:

- [ ] Support for STRICT mode expressions.
- [ ] Support for operation expressions (e.g. $.a.b.c > 12, <, >=, etc.).
- [ ] Support for filters with inequality checks (e.g. $.a.b ? (@.a > 10)).
- [ ] Support for nested logical operators within filters (&&, ||, !).
- [ ] Evaluate potential acceleration for array-level expressions like $[*].

Jira issue: CRDB-55728

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.