leonardBang commented on a change in pull request #12577:
URL: https://github.com/apache/flink/pull/12577#discussion_r438626592



##########
File path: 
flink-walkthroughs/flink-walkthrough-table-java/src/main/resources/archetype-resources/src/main/java/SpendReport.java
##########
@@ -39,10 +40,12 @@ public static void main(String[] args) throws Exception {
                                "spend_report", new SpendReportTableSink());
                tEnv.registerFunction("truncateDateToHour", new 
TruncateDateToHour());
 
-               tEnv
-                       .scan("transactions")
-                       .insertInto("spend_report");
+               TableResult tableResult = tEnv
+                               .scan("transactions")
+                               .executeInsert("spend_report");
 
-               tEnv.execute("Spend Report");
+               // wait job finished
+               tableResult.getJobClient().get()
+                               
.getJobExecutionResult(Thread.currentThread().getContextClassLoader()).get();

Review comment:
       ident

##########
File path: 
flink-walkthroughs/flink-walkthrough-table-java/src/main/resources/archetype-resources/src/main/java/SpendReport.java
##########
@@ -39,10 +40,12 @@ public static void main(String[] args) throws Exception {
                                "spend_report", new SpendReportTableSink());
                tEnv.registerFunction("truncateDateToHour", new 
TruncateDateToHour());
 
-               tEnv
-                       .scan("transactions")
-                       .insertInto("spend_report");
+               TableResult tableResult = tEnv
+                               .scan("transactions")
+                               .executeInsert("spend_report");

Review comment:
       ident




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


Reply via email to