Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql/schemachanger: Enable column type changes for virtual computed columns #135315

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Nov 15, 2024

  1. sql/schemachanger: Enable column type changes for virtual computed co…

    …lumns
    
    This update introduces support for altering the column type of virtual
    computed columns in the declarative schema changer (DSC). Previously,
    such operations were not allowed.
    
    A key characteristic of virtual columns is that type changes never
    require a backfill or column rewrite, as their values are computed
    dynamically during access. This change includes adjustments to handle
    type changes that would typically involve a rewrite as simple metadata
    updates instead.
    
    Additionally, the USING expression in ALTER TABLE statements is now
    explicitly disallowed for virtual columns, as no data rewriting occurs.
    Attempts to use this option will result in an error.
    
    Epic: CRDB-25314
    Closes: cockroachdb#125840
    Release note: none
    spilchen committed Nov 15, 2024
    Configuration menu
    Copy the full SHA
    5eb9fdf View commit details
    Browse the repository at this point in the history