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 6f0a77a3a2bbb76854ef9f64f7e6e66f39366838 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]