Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
wyxxxcat committed Feb 10, 2025
1 parent 612a288 commit d4bceed
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fe/fe-core/src/main/java/org/apache/doris/catalog/Column.java
Original file line number Diff line number Diff line change
Expand Up @@ -997,14 +997,15 @@ public String toSql(boolean isUniqueTable, boolean isCompatible) {
if (isAutoInc) {
sb.append(" AUTO_INCREMENT(").append(autoIncInitValue).append(")");
}
if (defaultValue != null && getDataType() != PrimitiveType.HLL && getDataType() != PrimitiveType.BITMAP) {
if (defaultValue != null && getDataType() != PrimitiveType.HLL && getDataType() != PrimitiveType.BITMAP
&& getDataType() != PrimitiveType.DOUBLE) {
if (defaultValueExprDef != null) {
sb.append(" DEFAULT ").append(defaultValue).append("");
} else {
sb.append(" DEFAULT \"").append(defaultValue).append("\"");
}
}
if (getDataType() == PrimitiveType.BITMAP && defaultValue != null) {
if ((getDataType() == PrimitiveType.BITMAP || getDataType() == PrimitiveType.DOUBLE) && defaultValue != null) {
if (defaultValueExprDef != null) {
sb.append(" DEFAULT ").append(defaultValueExprDef.getExprName()).append("");
}
Expand Down

0 comments on commit d4bceed

Please sign in to comment.