zhannngchen commented on code in PR #30512: URL: https://github.com/apache/doris/pull/30512#discussion_r1473745523
########## fe/fe-core/src/main/java/org/apache/doris/analysis/ColumnDef.java: ########## @@ -178,77 +178,79 @@ public String getValue() { private boolean isKey; private boolean isAllowNull; private boolean isAutoInc; + private long autoIncInitValue; private DefaultValue defaultValue; private String comment; private boolean visible; private int clusterKeyId = -1; public ColumnDef(String name, TypeDef typeDef) { - this(name, typeDef, false, null, false, false, DefaultValue.NOT_SET, ""); + this(name, typeDef, false, null, false, -1, DefaultValue.NOT_SET, ""); } public ColumnDef(String name, TypeDef typeDef, boolean isKey, AggregateType aggregateType, - boolean isAllowNull, boolean isAutoInc, DefaultValue defaultValue, String comment) { - this(name, typeDef, isKey, aggregateType, isAllowNull, isAutoInc, defaultValue, comment, true); + boolean isAllowNull, long autoIncInitValue, DefaultValue defaultValue, String comment) { + this(name, typeDef, isKey, aggregateType, isAllowNull, autoIncInitValue, defaultValue, comment, true); } public ColumnDef(String name, TypeDef typeDef, boolean isAllowNull) { this(name, typeDef, false, null, isAllowNull, DefaultValue.NOT_SET, ""); } public ColumnDef(String name, TypeDef typeDef, boolean isKey, AggregateType aggregateType, - boolean isAllowNull, DefaultValue defaultValue, String comment) { - this(name, typeDef, isKey, aggregateType, isAllowNull, false, defaultValue, comment, true); + boolean isAllowNull, DefaultValue defaultValue, String comment) { + this(name, typeDef, isKey, aggregateType, isAllowNull, -1, defaultValue, comment, true); } public ColumnDef(String name, TypeDef typeDef, boolean isKey, AggregateType aggregateType, - boolean isAllowNull, boolean isAutoInc, DefaultValue defaultValue, String comment, boolean visible) { + boolean isAllowNull, long autoIncInitValue, DefaultValue defaultValue, String comment, boolean visible) { this.name = name; this.typeDef = typeDef; this.isKey = isKey; this.aggregateType = aggregateType; this.isAllowNull = isAllowNull; - this.isAutoInc = isAutoInc; + this.isAutoInc = autoIncInitValue != 0; Review Comment: should be > 0 ? ########## fe/fe-core/src/main/java/org/apache/doris/analysis/ColumnDef.java: ########## @@ -560,6 +562,11 @@ public String toSql() { if (isAutoInc) { sb.append("AUTO_INCREMENT "); + if (autoIncInitValue != 0) { Review Comment: ditto -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org