yihua commented on code in PR #13650:
URL: https://github.com/apache/hudi/pull/13650#discussion_r2249390479
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/bulk/RowDataKeyGen.java:
##########
@@ -84,7 +86,8 @@ protected RowDataKeyGen(
boolean hiveStylePartitioning,
boolean encodePartitionPath,
boolean consistentLogicalTimestampEnabled,
- Option<TimestampBasedAvroKeyGenerator> keyGenOpt) {
+ Option<TimestampBasedAvroKeyGenerator> keyGenOpt,
+ boolean isComplexKeygenEncodeSingleRecordKeyFieldName) {
Review Comment:
@danny0405 thanks for fixing the key generator on Flink. AFAIK, there is no
other key generation logic beyond Avro, Spark, and Flink keygens, correct?
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/keygen/ComplexAvroKeyGenerator.java:
##########
@@ -38,18 +43,25 @@ public ComplexAvroKeyGenerator(TypedProperties props) {
.map(String::trim)
.filter(s -> !s.isEmpty())
.collect(Collectors.toList());
+ this.recordKeyFunction = ConfigUtils.getBooleanWithAltKeys(props,
COMPLEX_KEYGEN_ENCODE_SINGLE_RECORD_KEY_FIELD_NAME)
+ ? record -> KeyGenUtils.getRecordKey(record, getRecordKeyFieldNames(),
isConsistentLogicalTimestampEnabled())
+ : this::getRecordKeyWithoutKeyFieldNameOnSingleKeyField;
Review Comment:
Looks like the logic in `KeyGenUtils` has changed since 1.0.2 release so I
need to fix that to account for the flag too. Currently tests are failing
because of that.
--
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]