wuchong commented on a change in pull request #15211:
URL: https://github.com/apache/flink/pull/15211#discussion_r594182144



##########
File path: 
flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/cli/CliTableauResultView.java
##########
@@ -153,7 +153,12 @@ private void printResults(AtomicInteger receivedRowCount, 
boolean isStreamingMod
 
             switch (result.getType()) {
                 case EMPTY:
-                    // do nothing
+                    try {
+                        Thread.sleep(1);

Review comment:
       Add a comment to explain why we need to sleep here (avoid busy wait). 

##########
File path: 
flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/cli/CliTableauResultView.java
##########
@@ -153,7 +153,12 @@ private void printResults(AtomicInteger receivedRowCount, 
boolean isStreamingMod
 
             switch (result.getType()) {
                 case EMPTY:
-                    // do nothing
+                    try {
+                        Thread.sleep(1);
+                    } catch (InterruptedException e) {
+                        // get ctrl+c from terminal
+                        return;

Review comment:
       I think we can just ignore the exception here , do not need return (fall 
to break). 




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


Reply via email to