cockroachdb / cockroachdb/cockroach
sql/jsonpath: expand jsonb_path_exists index acceleration support
- 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
Assessment
This issue has not been assessed yet.