From f74a9986cacb4b9245de7222556d9febd2cb4203 Mon Sep 17 00:00:00 2001 From: Nick Tobey Date: Mon, 26 Aug 2024 17:58:13 -0700 Subject: [PATCH] Don't require rebuilding a table when a column is added to a virtual table. --- sql/rowexec/ddl_iters.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/rowexec/ddl_iters.go b/sql/rowexec/ddl_iters.go index 965e218e9d..32d7f4536e 100644 --- a/sql/rowexec/ddl_iters.go +++ b/sql/rowexec/ddl_iters.go @@ -2200,7 +2200,7 @@ func rewriteTableForIndexCreate(ctx *sql.Context, n *plan.AlterIndex, table sql. // indexRequiresBuild returns whether the given index requires a build operation to be performed as part of its creation func indexCreateRequiresBuild(n *plan.AlterIndex) bool { - return n.Constraint == sql.IndexConstraint_Unique || indexOnVirtualColumn(n.Columns, n.TargetSchema()) + return n.Constraint == sql.IndexConstraint_Unique } func indexOnVirtualColumn(columns []sql.IndexColumn, schema sql.Schema) bool {