liyubin117 commented on code in PR #24934: URL: https://github.com/apache/flink/pull/24934#discussion_r1639243865
########## flink-table/flink-table-common/src/main/java/org/apache/flink/table/catalog/CatalogDescriptor.java: ########## @@ -48,18 +55,34 @@ public Configuration getConfiguration() { return configuration; } - private CatalogDescriptor(String catalogName, Configuration configuration) { + public Optional<String> getComment() { + return Optional.ofNullable(comment); + } + + public CatalogDescriptor setComment(String comment) { + return new CatalogDescriptor(catalogName, configuration, comment); + } Review Comment: done ########## flink-table/flink-sql-parser/src/test/java/org/apache/flink/sql/parser/FlinkSqlParserImplTest.java: ########## @@ -134,6 +134,28 @@ void testCreateCatalog() { + " 'key1' = 'value1',\n" + " 'key2' = 'value2'\n" + ")"); + sql("create catalog c1 comment 'hello'\n" + + " WITH (\n" + + " 'key1'='value1',\n" + + " 'key2'='value2'\n" + + " )\n") + .ok( + "CREATE CATALOG `C1`\n" + + "COMMENT 'hello' WITH (\n" + + " 'key1' = 'value1',\n" + + " 'key2' = 'value2'\n" + + ")"); + sql("create catalog if not exists c1 comment 'hello'\n" + + " WITH (\n" + + " 'key1'='value1',\n" + + " 'key2'='value2'\n" + + " )\n") + .ok( + "CREATE CATALOG IF NOT EXISTS `C1`\n" + + "COMMENT 'hello' WITH (\n" + + " 'key1' = 'value1',\n" + + " 'key2' = 'value2'\n" + + ")"); 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org