danny0405 commented on a change in pull request #8844: 
[FLINK-12951][table-planner] Add logic to bridge DDL to table source(…
URL: https://github.com/apache/flink/pull/8844#discussion_r300222001
 
 

 ##########
 File path: 
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/internal/TableEnvironmentImpl.java
 ##########
 @@ -245,6 +247,57 @@ public String explain(Table table) {
                return planner.getCompletionHints(statement, position);
        }
 
+       @Override
+       public void sql(String statement) {
+               List<Operation> operations = planner.parse(statement);
+               operations.forEach(operation -> {
+                       if (operation instanceof CreateTableOperation) {
+                               CreateTableOperation operation1 = 
(CreateTableOperation) operation;
+                               registerTable(
+                                       operation1.getTablePath(),
+                                       operation1.getCatalogTable(),
+                                       operation1.isIgnoreIfExists());
+                       } else if (operation instanceof ModifyOperation) {
+                               queryConfigProvider.setConfig(new 
StreamQueryConfig());
+                               List<Transformation<?>> transformations =
+                                       
planner.translate(Collections.singletonList((ModifyOperation) operation));
+
+                               execEnv.apply(transformations);
+                       } else {
+                               throw new ValidationException(
 
 Review comment:
   Yep, no bridge logic in this patch.

----------------------------------------------------------------
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


With regards,
Apache Git Services

Reply via email to