[ 
https://issues.apache.org/jira/browse/HUDI-3411?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17495881#comment-17495881
 ] 

todd commented on HUDI-3411:
----------------------------

agree。in 
addition,KeyGenUtils#getRecordKey(org.apache.avro.generic.GenericRecord, 
java.lang.String, boolean) and 
KeyGenUtils#getRecordKey(org.apache.avro.generic.GenericRecord, 
java.lang.String, boolean)

There are some differences in the format of the generated key, which causes the 
recordkey and the recordkey written by flink to not match correctly.

If you want to modify, how to unify.

> Incorrect Record Key Field property Handling
> --------------------------------------------
>
>                 Key: HUDI-3411
>                 URL: https://issues.apache.org/jira/browse/HUDI-3411
>             Project: Apache Hudi
>          Issue Type: Bug
>            Reporter: Alexey Kudinkin
>            Priority: Blocker
>             Fix For: 0.11.0
>
>
> Currently `HoodieTableConfig#getRecordKeyFieldProp` returns a single String, 
> even though it could contain a *list* of columns making up composite Primary 
> Key.
> {code:java}
> public String getRecordKeyFieldProp() {
>   return getStringOrDefault(RECORDKEY_FIELDS, 
> HoodieRecord.RECORD_KEY_METADATA_FIELD);
> } {code}
>  
> Most of the callers of this method are actually not handling this correctly, 
> assuming that the Record Key is always a single field. 
> NOTE: While concatenation of CPK seems like a very natural step here, special 
> care has to be taken, since Composite PK can NOT be concatenated as strings, 
> as this might break the uniqueness constraint. 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to