KurtYoung 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_r300319983
##########
File path:
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/internal/TableEnvironmentImpl.java
##########
@@ -445,4 +500,36 @@ protected TableImpl createTable(QueryOperation
tableOperation) {
operationTreeBuilder,
functionCatalog);
}
+
+ /**
+ * Create a result table to show the sql statement execution status,
not the data set.
+ * E.g. A create table DDL statement may returns a table with one
column of content:
+ * "create table success."
+ * @param result The execution result to show(or for query).
+ */
+ private TableImpl createResultTable(String result) {
+ QueryOperation queryOperation = new QueryOperation() {
+ @Override
+ public TableSchema getTableSchema() {
+ return TableSchema.builder()
+ .field("RESULT",
DataTypes.VARCHAR(Integer.MAX_VALUE))
+ .build();
+ }
+
+ @Override
+ public List<QueryOperation> getChildren() {
+ return new ArrayList<>();
+ }
+
+ @Override
+ public String asSummaryString() {
+ return "Query result operation: " + result;
+ }
+ };
+ return TableImpl.createTable(
Review comment:
I'm not sure this is a valid way to create a workable table...
----------------------------------------------------------------
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