This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new d96278ab212 [bug](fix) show create table show comment error (#28346)
d96278ab212 is described below
commit d96278ab212ff122e9e5176ee1bcc9da2430d911
Author: Liqf <[email protected]>
AuthorDate: Wed Dec 27 21:17:20 2023 +0800
[bug](fix) show create table show comment error (#28346)
---
.../main/java/org/apache/doris/nereids/parser/LogicalPlanBuilder.java | 4 +++-
1 file changed, 3 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 cf670fe1aa9..71890516628 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
@@ -2424,7 +2424,9 @@ public class LogicalPlanBuilder extends
DorisParserBaseVisitor<Object> {
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);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]