-
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.
135067: sql/schemachanger: Support type changes for stored computed columns r=spilchen a=spilchen This update adds support for type changes on columns with stored computed expressions in the declarative schema change (DSC). Previously, these type changes were blocked and would fall back to the legacy schema changer, which didn't fully support computed columns as it would lose the expression. A block has now been added to the legacy schema changer to prevent unsupported changes since it is deprecated. In the DSC, a new dependency rule ensures that the compute expression is added after the temporary compute expression (used during the backfill to copy data from the old column to the new one) completes. This change is only for stored computed columns. We have a follow-on issue to address this for virtual computed columns. Note, changing the type of a computed column has limited applicability, as the expression itself remains unchanged. Therefore, the new type must be compatible with the original type, often meaning it belongs to the same type family (e.g., INT2 -> INT4). Epic: CRDB-25314 Closes #125844 Release note: none Co-authored-by: Matt Spilchen <[email protected]>
- Loading branch information
Showing
7 changed files
with
290 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
Oops, something went wrong.