Skip to content

Commit

Permalink
Don't require rebuilding a table when a column is added to a virtual …
Browse files Browse the repository at this point in the history
…table.
  • Loading branch information
nicktobey committed Aug 27, 2024
1 parent 88fb8c3 commit 5bea118
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sql/rowexec/ddl_iters.go
Original file line number Diff line number Diff line change
Expand Up @@ -2256,7 +2256,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 {
Expand Down

0 comments on commit 5bea118

Please sign in to comment.