Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
opt: inverted-index accelerate filters of the form j = ... and j IN (…
…...) An inverted index can be used to accelerate queries, using the = and the IN operator, with filters having the fetch value operator present; eg: j->0 = '{"b": "c"}' and j->0 IN ('1', '2') where j is a JSON column. This has been completed here: This PR aims to add support to generate inverted spans for queries not involving the fetch val operator and having the `=` operator or the `IN` operator. This was done by creating JSON objects from the JSON values present on the right side of the equality or the IN expression. Moreover, in this case, no "keys" were extracted from the left hand side of the operators while creating these JSON objects which were useful for creating the inverted spans. Epic: CRDB-3301 Fixes: #96658 Release note (performance improvement): The optimizer now plans inverted index scans for queries that do not use the JSON fetch value operator (`->`) alongside the `IN` and the `=` operators. eg: json_col = '{"b": "c"}' OR json_col IN ('"a"', '1')
- Loading branch information