ferenc-csaky commented on code in PR #27:
URL:
https://github.com/apache/flink-connector-hbase/pull/27#discussion_r1356603415
##########
flink-connector-hbase-2.2/src/test/java/org/apache/flink/connector/hbase2/HBaseConnectorITCase.java:
##########
@@ -384,11 +383,13 @@ public void testTableSourceSinkWithDDL() throws Exception
{
TableResult tableResult3 = batchEnv.executeSql(query);
- List<String> result =
- Lists.newArrayList(tableResult3.collect()).stream()
- .map(Row::toString)
- .sorted()
- .collect(Collectors.toList());
+ List<String> result = new ArrayList<>();
+ for (CloseableIterator<Row> it = tableResult3.collect(); it.hasNext();
) {
+ Row row = it.next();
+ result.add(row.toString());
+ }
+ Collections.sort(result);
+ result = new ArrayList<>(result);
Review Comment:
I see, that's a fair point. IMO since we already touch the code we can try
make it simpler/cleaner in the same step. Yes, that always has the risk of
introducing a regression. Anyways, fine by me to leave it with the stream api.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]