KurtYoung commented on a change in pull request #15562:
URL: https://github.com/apache/flink/pull/15562#discussion_r611413441
##########
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:
If you check the signature of `PrintUtils.columnWidthsByType` and you
will see the second parameter is *maxColumnWidth*. DEFAULT_COLUMN_WIDTH will
not be enough even for some popular data types such as `TIMESTAMP(3)`
##########
File path:
flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/cli/CliTableauResultView.java
##########
@@ -29,19 +29,22 @@
import org.jline.terminal.Terminal;
+import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CancellationException;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.atomic.AtomicInteger;
+import java.util.stream.Collectors;
import java.util.stream.Stream;
/** Print result in tableau mode. */
public class CliTableauResultView implements AutoCloseable {
private static final int DEFAULT_COLUMN_WIDTH = 20;
+ private static final int BATCH_CACHE_DATA_SIZE = 5000;
Review comment:
reuse `sql-client.execution.max-table-result.rows`?
##########
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:
Why you retrieve results here and continue to retrieve results in the
while loop in line#186?
--
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]