[fix](schema change) fix the defineName field is not the same when copying column (#34201)

* [fix](schema change) fix the defineName field is not the same when copying column

* fix
This commit is contained in:
Luwei
2024-04-27 11:59:07 +08:00
committed by GitHub
parent cf700a62b6
commit 36e80af327
3 changed files with 69 additions and 1 deletions

View File

@ -289,7 +289,7 @@ public class Column implements Writable, GsonPostProcessable {
this.children = column.getChildren();
this.uniqueId = column.getUniqueId();
this.defineExpr = column.getDefineExpr();
this.defineName = column.getDefineName();
this.defineName = column.getRealDefineName();
this.hasOnUpdateDefaultValue = column.hasOnUpdateDefaultValue;
this.onUpdateDefaultValueExprDef = column.onUpdateDefaultValueExprDef;
this.clusterKeyId = column.getClusterKeyId();
@ -336,6 +336,12 @@ public class Column implements Writable, GsonPostProcessable {
return name;
}
// In order for the copy constructor to get the real defineName value.
// getDefineName() cannot meet this requirement
public String getRealDefineName() {
return defineName;
}
public void setName(String newName) {
this.name = newName;
}