godfreyhe commented on a change in pull request #11700: [FLINK-16366] [table]
Introduce executeSql method in TableEnvironment and support many statements
URL: https://github.com/apache/flink/pull/11700#discussion_r407859387
##########
File path:
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/internal/TableEnvironmentImpl.java
##########
@@ -552,6 +566,39 @@ public Table sqlQuery(String query) {
}
}
+ @Override
+ public TableResult executeSql(String statement) {
+ List<Operation> operations = parser.parse(statement);
+
+ if (operations.size() != 1) {
+ throw new
TableException(UNSUPPORTED_QUERY_IN_EXECUTE_SQL_MSG);
+ }
+
+ Operation operation = operations.get(0);
+ if (operation instanceof CreateTableOperation ||
Review comment:
we can simplify this
----------------------------------------------------------------
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