-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
59266: opt: build scan InvertedConstraints from JSON FetchVal operator r=mgartner a=mgartner #### opt: rename inverted constraint contains extraction function The function name now reflects that it specifically deals with the Contains expression, `@>`. Release note: None #### opt: add rule expectations for GenerateInvertedIndexScan tests Release note: None #### invertedidx: add convenience function for extracting index column variable Release note: None #### opt: build inverted index scan constraints from JSON fetch val operator GenerateInvertedIndexScans now generates InvertedConstraints from equality expressions with a JSON FetchVal operator on the left side and a constant on the right side, like `j->'a' = '1'`. Previously Constraints were built for these expressions with the `idxconstraint` package. By building InvertedConstraints from FetchVal operators, the optimizer now has the ability to generate inverted index scans with conjunctive and disjunctive filters containing FetchVal operators. For example, the optimizer will plan an inverted index scan with the query below. CREATE TABLE t (k INT PRIMARY KEY, j JSON, INVERTED INDEX (j)) SELECT k FROM t WHERE j->'a' = '1' AND j->'b' = 2 This change also brings us a step closer to cleaning up the `idxconstraint` by removing code related to inverted indexes. Informs #47340 Release note (performance improvement): The query optimizer now plans scans over inverted indexes on JSON columns for query filters that constrain the JSON column with equality and fetch value operators (`->`) inside conjunctions and disjunctions, like `j->'a' = '1' AND j->'b' = '2'`. #### opt: build InvertedConstraints for inverted index scans on computed columns GenerateInvertedIndexScans now builds InvertedConstraints over inverted indexes on computed columns when a filter constrains an expression that is equivalent to the computed column expression. Previously Constraints were built for these expressions with the `idxconstraint` package. This change provides no functional change, but brings us a step closer to cleaning up the `idxconstraint` by removing code related to inverted indexes. Release note: None #### opt: do not build Constraints in GenerateInvertedIndexScans InvertedConstraints can be built for inverted index scans in all cases that Constraints could be built. Therefore there is no longer a need to build Constraints in GenerateInvertedIndexScans. This commit removes the code related to this. Release note: None 59408: *:upgrade vendored pgconn to v1.8.0 r=gaoxk a=gaoxk The old version of pgconn asynchronously cancelled requests to the server. However, .connect synchronously closes connections in responses to errors. This causes race conditions for goroutine leaks. The newer pgconn synchronously closes connections to the server, ideally eliminating this race condition. See jackc/pgconn@340bfec Release note (general change): Upgrade to v1.8.0 `pgconn` to patch potential race condition errors. Co-authored-by: Marcus Gartner <[email protected]> Co-authored-by: Kristy Gao <[email protected]>
- Loading branch information
Showing
18 changed files
with
542 additions
and
166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.