This is an automated email from the ASF dual-hosted git repository.
yiguolei 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 84dd3edd0d [Bug](view) Show create view support comment #12838
84dd3edd0d is described below
commit 84dd3edd0d99504b7a8edb17bac8a1b27e1abc55
Author: Stalary <[email protected]>
AuthorDate: Fri Sep 23 09:09:44 2022 +0800
[Bug](view) Show create view support comment #12838
---
fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java
b/fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java
index c07da5df24..20a85c829b 100755
--- a/fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java
@@ -2706,7 +2706,12 @@ public class Env {
// 1.1 view
if (table.getType() == TableType.VIEW) {
View view = (View) table;
- sb.append("CREATE VIEW `").append(table.getName()).append("` AS
").append(view.getInlineViewDef());
+
+ sb.append("CREATE VIEW `").append(table.getName()).append("`");
+ if (StringUtils.isNotBlank(table.getComment())) {
+ sb.append(" COMMENT '").append(table.getComment()).append("'");
+ }
+ sb.append(" AS ").append(view.getInlineViewDef());
createTableStmt.add(sb + ";");
return;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]