Skip to content

Commit

Permalink
Respond to PR comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
nicktobey committed Feb 25, 2025
1 parent 4c3748c commit 743eb87
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions go/libraries/doltcore/sqle/tables.go
Original file line number Diff line number Diff line change
Expand Up @@ -1686,13 +1686,11 @@ func (t *AlterableDoltTable) columnChangeRequiresRewrite(oldColumn *sql.Column,
// TODO: we need to do this because some spatial type changes require a full table check, but not all.
// We could narrow this check down.
return true
} else if types.IsFormat_DOLT(t.Format()) {
} else {
// This is overly broad, we could narrow this down a bit
compatibilityChecker := typecompatibility.NewTypeCompatabilityCheckerForStorageFormat(t.Format())
typeChangeInfo := compatibilityChecker.IsTypeChangeCompatible(existingCol.TypeInfo, newCol.TypeInfo)
return !typeChangeInfo.Compatible || typeChangeInfo.RewriteRows || typeChangeInfo.InvalidateSecondaryIndexes
} else if existingCol.Kind != newCol.Kind {
return true
}
}

Expand Down

0 comments on commit 743eb87

Please sign in to comment.