lokeshj1703 commented on code in PR #11926:
URL: https://github.com/apache/hudi/pull/11926#discussion_r1768456068


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/keygen/CustomAvroKeyGenerator.java:
##########
@@ -99,31 +102,42 @@ public static List<PartitionKeyType> 
getPartitionTypes(List<String> partitionPat
     if (partitionPathFields.size() == 1 && 
partitionPathFields.get(0).isEmpty()) {
       return Collections.emptyList(); // Corresponds to no partition case
     } else {
-      return partitionPathFields.stream().map(field -> {
-        Pair<String, CustomAvroKeyGenerator.PartitionKeyType> partitionAndType 
= getPartitionFieldAndKeyType(field);
-        return partitionAndType.getRight();
-      }).collect(Collectors.toList());
+      return partitionPathFields.stream().map(field -> 
getPartitionFieldAndKeyType(field).getRight())
+          .filter(Option::isPresent)

Review Comment:
   This should already be checked during instantiation of custom keygen in 
`org.apache.hudi.keygen.CustomAvroKeyGenerator#getPartitionKeyGenerators`.



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

Reply via email to