bowenli86 commented on a change in pull request #11116: [FLINK-15349] add
'create catalog' DDL to blink planner
URL: https://github.com/apache/flink/pull/11116#discussion_r381550817
##########
File path:
flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/operations/SqlToOperationConverter.java
##########
@@ -358,6 +364,22 @@ private Operation convertUseCatalog(SqlUseCatalog
useCatalog) {
return new UseCatalogOperation(useCatalog.getCatalogName());
}
+ /** Convert CREATE CATALOG statement. */
+ private Operation convertCreateCatalog(SqlCreateCatalog
sqlCreateCatalog) {
+ String catalogName = sqlCreateCatalog.catalogName();
+
+ // set with properties
+ Map<String, String> properties = new HashMap<>();
+ sqlCreateCatalog.getPropertyList().getList().forEach(p ->
+ properties.put(((SqlTableOption) p).getKeyString(),
((SqlTableOption) p).getValueString()));
Review comment:
i'd leave it as is. if anyone is interested, they can refactor all the
methods in SqlToOperationConverter all together
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services