forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
opt: build partial index predicates only when all table columns are i…
…n scope This commit fixes a panic induced by trying to build partial index predicate expressions without all of a table's columns in-scope. Some scans, like scans built for foreign key checks, do not include all of a table's column in their scope. For such scans, optbuilder no longer attempts to build a partial index predicate because the predicate may reference a column that is not in scope. As a result of this change, `opt.TableMeta` may not have a predicate expression for all partial indexes. The `memo.PartialIndexPredicate` function which retrieves the predicate expressions has been updated to account for this case. Fixes cockroachdb#55672 Release justification: This is a critical bug fix for a new feature, partial indexes. Release note (bug fix): An INSERT into a table with a foreign key reference to a table with a partial index no longer causes an error.
- Loading branch information
Showing
6 changed files
with
147 additions
and
17 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