waywtdcc commented on code in PR #7009:
URL: https://github.com/apache/hudi/pull/7009#discussion_r1003885199
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/util/DataTypeUtils.java:
##########
@@ -123,4 +128,39 @@ public static Object resolvePartition(String partition,
DataType type) {
"Can not convert %s to type %s for partition value",
partition, type));
}
}
+
+ /**
+ * Ensures the give columns of the row data type are not nullable(for
example, the primary keys).
+ *
+ * @param dataType The row data type
+ * @param pkColumns The primary keys
+ * @return a new row data type if any column nullability is tweaked or the
original data type
+ */
+ public static DataType ensureColumnsAsNonNullable(DataType dataType,
@Nullable List<String> pkColumns) {
Review Comment:
Hello, thank you for your reviews. This method is used to convert the
primary key field into not null type.
--
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]