[bug](fix) show create table show comment error (#28346)

This commit is contained in:
Liqf
2023-12-27 21:17:20 +08:00
committed by GitHub
parent 224677af7c
commit d96278ab21

View File

@ -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);