[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:
@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user