geserdugarov commented on code in PR #13570:
URL: https://github.com/apache/hudi/pull/13570#discussion_r2213103659
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/bulk/RowDataKeyGens.java:
##########
@@ -31,17 +33,26 @@
public class RowDataKeyGens {
/**
- * Creates a {@link RowDataKeyGen} with given configuration.
+ * Creates {@link RowDataKeyGen} of corresponding type depending on table
configuration.
*/
- public static RowDataKeyGen instance(Configuration conf, RowType rowType,
int taskId, String instantTime) {
+ public static RowDataKeyGen instance(Configuration conf, RowType rowType,
@Nullable Integer taskId, @Nullable String instantTime) {
String recordKeys = conf.getString(FlinkOptions.RECORD_KEY_FIELD);
if (hasRecordKey(recordKeys, rowType.getFieldNames())) {
return RowDataKeyGen.instance(conf, rowType);
} else {
+ assert taskId != null;
+ assert instantTime != null;
Review Comment:
Also added UTs in 9b2eb392f5b6aa22a98e57f42891a79b990c088a for not allowed
`AutoRowDataKeyGen` instantiation with `null`s, and for proper work of this
keygen.
--
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]