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


##########
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:
   Only Complex key generator with a single record key field is affected so 
it's better to point fix this now.  Also, unlike Complex key generator, with 
Custom key generator using the single record key and multiple partition fields, 
the record keys are encoded without record key field name, so the general 
condition of the single record key with multiple partition fields does not work 
for Complex and Custom Key generator at the same time.



##########
hudi-common/src/main/java/org/apache/hudi/keygen/KeyGenerator.java:
##########
@@ -70,14 +70,8 @@ public List<String> getRecordKeyFieldNames() {
    * @param recordValueFunction takes the record key field name and the index 
of the field in the record key fields and outputs a value
    * @return the record key
    */
+  // TODO(yihua): check all callers

Review Comment:
   Will address.



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