alexeykudinkin commented on code in PR #7009:
URL: https://github.com/apache/hudi/pull/7009#discussion_r1006230825


##########
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:
   @waywtdcc i understand that. What i'm saying though is that there's no 
reason for us to couple it to primary keys (it should be generic to be able to 
handle any columns)



-- 
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: commits-unsubscr...@hudi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to