danny0405 commented on code in PR #13650:
URL: https://github.com/apache/hudi/pull/13650#discussion_r2290730102


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/BaseHoodieWriteClient.java:
##########
@@ -1689,4 +1694,22 @@ private InternalSchema 
getInternalSchema(TableSchemaResolver schemaUtil) {
       }
     });
   }
+
+  private void validateComplexKeygen(HoodieTableMetaClient metaClient) {
+    HoodieTableConfig tableConfig = metaClient.getTableConfig();
+    String keyGeneratorClassName = tableConfig.getKeyGeneratorClassName();
+    Option<String[]> recordKeyFields = tableConfig.getRecordKeyFields();
+    if ((SPARK_COMPLEX_KEYGEN_CLASS_NAME.equals(keyGeneratorClassName)

Review Comment:
   It must be either complex key gen or custom key gen for this special case: 
record key is single and partition fields a re multiple, that is by design. So 
you can check this special case and exclude the custom ken gen to throw.



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