From d9702a5cda140e501adcbf376110b6bded40d760 Mon Sep 17 00:00:00 2001 From: LemonLiTree Date: Wed, 13 Dec 2023 17:17:15 +0800 Subject: [PATCH] fix --- .../org/apache/doris/nereids/parser/LogicalPlanBuilder.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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..8af29823e5de19 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,8 @@ 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);