forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
83222: sql/schemachanger: model IndexColumn, avoid index backfill when unneeded r=ajwerner a=ajwerner **sql/schemachanger/rel: add support for Neq (!=)** **sql/schemachanger: model IndexColumn explicitly** This change normalizes the columns in an index. This lays the foundation to handle cases where we add a NULL-able new column without a default value. In these cases, we should just modify the existing index in-place. That work will come in a follow-up commit. This will also prove valuable for more complex add column scenarios. **sql/schemachanger: add a special case for simple add column** Before this change, when we added a column, we'd always create a new primary index and swap into it. In the case where we're adding a nullable column with no default value or computed expression, we have no reason to do this whole dance. Indeed, backfilling that new index was a major regression for this common case when compared to the legacy schema changer. In this commit, we detect this special case and just add the new column to the existing primary index. Release note: None Co-authored-by: Andrew Werner <[email protected]>
- Loading branch information
Showing
127 changed files
with
4,559 additions
and
2,552 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
Oops, something went wrong.