yihua commented on code in PR #13208:
URL: https://github.com/apache/hudi/pull/13208#discussion_r2059296351
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/bulk/RowDataKeyGen.java:
##########
@@ -167,7 +167,9 @@ public String getPartitionPath(RowData rowData) {
}
private static String getRecordKey(Object[] keyValues, String[] keyFields,
boolean consistentLogicalTimestampEnabled) {
- return KeyGenerator.constructRecordKey(Arrays.asList(keyFields),
Arrays.stream(keyValues).map(value ->
getTimestampValue(consistentLogicalTimestampEnabled,
value)).collect(Collectors.toList()));
+ AtomicInteger index = new AtomicInteger(0);
Review Comment:
This is a hot method and `AtomicInteger` could introduce overhead. Should
this method and the caller be refactored so that
`RowDataKeyGen.recordKeyProjection` can be used based on the record key field
name instead of the array index?
--
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]