You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/07/22 10:13:41 UTC

[GitHub] [flink] godfreyhe commented on a change in pull request #12923: [FLINK-18621][sql-client] Simplify the methods of Executor interface in sql client

godfreyhe commented on a change in pull request #12923:
URL: https://github.com/apache/flink/pull/12923#discussion_r458686380



##########
File path: flink-core/src/main/java/org/apache/flink/util/CollectionUtil.java
##########
@@ -99,4 +100,18 @@ public static boolean isNullOrEmpty(Map<?, ?> map) {
 		iterable.iterator().forEachRemaining(list::add);
 		return list;
 	}
+
+	/**
+	 * Collects the elements in the Iterator in a List. If the iterator argument is null,
+	 * this method returns an empty list.
+	 */
+	public static <E> List<E> iteratorToList(@Nullable Iterator<E> iterator) {

Review comment:
       keep the same implementation of `CollectionUtil#iterableToList`




----------------------------------------------------------------
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:
users@infra.apache.org