LadyForest commented on a change in pull request #14944: URL: https://github.com/apache/flink/pull/14944#discussion_r577347696
########## File path: flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/operations/SqlToOperationConverter.java ########## @@ -864,6 +874,32 @@ private Operation convertDescribeTable(SqlRichDescribeTable sqlRichDescribeTable return new DescribeTableOperation(identifier, sqlRichDescribeTable.isExtended()); } + /** Convert LOAD MODULE statement. */ + private Operation convertLoadModule(SqlLoadModule sqlLoadModule) { + String moduleName = sqlLoadModule.moduleName(); + Map<String, String> properties = new HashMap<>(); + for (SqlNode node : sqlLoadModule.getPropertyList().getList()) { + SqlTableOption option = (SqlTableOption) node; + if (MODULE_TYPE.equals(option.getKeyString())) { + String moduleType = option.getValueString(); + throw new ValidationException( + String.format( + "Property 'type' = '%s' is not supported, please remove it and " + + "rename module to '%s' and try again", + moduleType, moduleType)); + } + properties.put(option.getKeyString(), option.getValueString()); + } + properties.put(MODULE_TYPE, moduleName); + return new LoadModuleOperation(moduleName, properties); + } + + /** Convert UNLOAD MODULE statement. */ + private Operation convertUnloadModule(SqlUnloadModule sqlUnloadModule) { + String moduleName = sqlUnloadModule.moduleName().toLowerCase(); Review comment: Good catch! It's a typo and I'll remove it. ---------------------------------------------------------------- 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: us...@infra.apache.org