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 2019/12/13 09:29:18 UTC

[GitHub] [flink] wuchong commented on a change in pull request #10563: [FLINK-15232][table] Message of NoMatchingTableFactoryException should tell users what's wrong

wuchong commented on a change in pull request #10563: [FLINK-15232][table] Message of NoMatchingTableFactoryException should tell users what's wrong
URL: https://github.com/apache/flink/pull/10563#discussion_r357547300
 
 

 ##########
 File path: flink-table/flink-table-common/src/main/java/org/apache/flink/table/factories/TableFactoryService.java
 ##########
 @@ -269,16 +271,67 @@
 			plainContext.remove(CATALOG_PROPERTY_VERSION);
 
 			// check if required context is met
-			return plainContext.keySet()
-				.stream()
-				.allMatch(e -> properties.containsKey(e) && properties.get(e).equals(plainContext.get(e)));
-		}).collect(Collectors.toList());
+			int matchedSize = 0;
+			Map<String, Tuple2<String, String>> unMatchedProperties = new HashMap<>();
+			for (Map.Entry<String, String> e : plainContext.entrySet()) {
+				if (properties.containsKey(e.getKey()) &&
+						properties.get(e.getKey()).equals(e.getValue())) {
+					matchedSize++;
 
 Review comment:
   If we have `unMatchedProperties`, we don't need to track `matchedSize` any more. 

----------------------------------------------------------------
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


With regards,
Apache Git Services