diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilder.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilder.java index 6b644bc723823f..30fd3dc5ce6271 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilder.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilder.java @@ -2326,7 +2326,9 @@ public ColumnDefinition visitColumnDef(ColumnDefContext ctx) { e.getCause()); } } - String comment = ctx.comment != null ? ctx.comment.getText() : ""; + //comment should remove '\' and '(") at the beginning and end + String comment = ctx.comment != null ? ctx.comment.getText().substring(1, ctx.comment.getText().length() - 1) + .replace("\\", "") : ""; boolean isAutoInc = ctx.AUTO_INCREMENT() != null; return new ColumnDefinition(colName, colType, isKey, aggType, !isNotNull, isAutoInc, defaultValue, onUpdateDefaultValue, comment);