fhueske commented on a change in pull request #6621: [FLINK-8686] [sql-client]
Limit result size for prototyping modes
URL: https://github.com/apache/flink/pull/6621#discussion_r213012121
##########
File path:
flink-libraries/flink-sql-client/src/main/java/org/apache/flink/table/client/cli/CliChangelogResultView.java
##########
@@ -133,6 +134,13 @@ protected void refresh() {
}
// update results
+
+ // formatting and printing of rows is
expensive in the current implementation,
+ // therefore we limit the maximum
number of lines shown in changelog mode to
+ // keep the CLI responsive
+ if (results.size() >=
DEFAULT_MAX_ROW_COUNT) {
+ results.remove(0);
Review comment:
Alternatively, we could delete all entries at once with
`ArrayList.removeRange()`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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