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


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/keygen/CustomAvroKeyGenerator.java:
##########
@@ -78,7 +79,8 @@ private static List<BaseKeyGenerator> 
getPartitionKeyGenerators(List<String> par
       return partitionPathFields.stream().map(field -> {
         Pair<String, Option<CustomAvroKeyGenerator.PartitionKeyType>> 
partitionAndType = getPartitionFieldAndKeyType(field);
         if (partitionAndType.getRight().isEmpty()) {
-          throw new HoodieKeyException("Unable to find field names for 
partition path in proper format");
+          throw new HoodieKeyGeneratorException("Unable to find field names 
for partition path in proper format. "

Review Comment:
   Yeah this is great! Since we have it twice we can make the string a static 
final var in this class and then use that in the spark custom keygen



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