codope commented on code in PR #6016:
URL: https://github.com/apache/hudi/pull/6016#discussion_r966582484


##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/keygen/SimpleKeyGenerator.java:
##########
@@ -46,6 +47,12 @@ public SimpleKeyGenerator(TypedProperties props) {
 
   SimpleKeyGenerator(TypedProperties props, String recordKeyField, String 
partitionPathField) {
     super(props);
+    // Make sure key-generator is configured properly
+    ValidationUtils.checkArgument(recordKeyField == null || 
!recordKeyField.isEmpty(),
+        "Record key field has to be non-empty!");
+    ValidationUtils.checkArgument(partitionPathField == null || 
!partitionPathField.isEmpty(),

Review Comment:
   Discussed offline. It will be taken up separately. @alexeykudinkin in case 
if you have a JIRA, please link it here. For simple keygen we need the 
validation because of misconfiguration of some tests that were passing “” as 
partition fields.



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