fsk119 commented on a change in pull request #15562:
URL: https://github.com/apache/flink/pull/15562#discussion_r611466321
##########
File path:
flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/cli/CliTableauResultView.java
##########
@@ -132,11 +145,23 @@ private void printResults(AtomicInteger receivedRowCount,
boolean isStreamingMod
DEFAULT_COLUMN_WIDTH,
Review comment:
reuse `PrintUtils.MAX_COLUMN_WIDTH`
```
+--------------------------+
| current_timestamp |
+--------------------------+
| 2021-04-12T08:59:24.973Z |
+--------------------------+
Received a total of 1 row
```
##########
File path:
flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/cli/CliTableauResultView.java
##########
@@ -132,11 +145,23 @@ private void printResults(AtomicInteger receivedRowCount,
boolean isStreamingMod
DEFAULT_COLUMN_WIDTH,
PrintUtils.NULL_COLUMN,
PrintUtils.ROW_KIND_COLUMN);
+ isEndOfStream = getEndOfStreamWhenRetrieveRows(change);
Review comment:
Because `ResultRetrievalThread` is fetching data and put the data into
the buffer by rows. Only the thread gets the mutex and the buffer is not full,
the thread will put the row into the buffer.
When we try to read data from the
`ChangelogCollectResult#changeRecordBuffer` in
`getEndOfStreamWhenRetrieveRows`, we may read part of the final result.
Therefore, we need continue reading the data in the loop until get EOS.
--
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]