liyubin117 commented on code in PR #24934:
URL: https://github.com/apache/flink/pull/24934#discussion_r1639244971


##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/operations/converters/SqlCreateCatalogConverter.java:
##########
@@ -41,6 +43,10 @@ public Operation convertSqlNode(SqlCreateCatalog node, 
ConvertContext context) {
                                         ((SqlTableOption) p).getKeyString(),
                                         ((SqlTableOption) 
p).getValueString()));
 
-        return new CreateCatalogOperation(node.catalogName(), properties);
+        return new CreateCatalogOperation(
+                node.catalogName(),
+                properties,
+                getCatalogComment(node.getComment()),

Review Comment:
   done



##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/utils/OperationConverterUtils.java:
##########
@@ -85,6 +87,13 @@ public static List<TableChange> buildModifyColumnChange(
         }
     }
 
+    public static @Nullable String getCatalogComment(Optional<SqlNode> 
catalogComment) {
+        return catalogComment
+                .map(SqlCharStringLiteral.class::cast)
+                .map(c -> c.getValueAs(NlsString.class).getValue())
+                .orElse(null);
+    }
+

Review Comment:
   done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to