hbgstc123 commented on code in PR #7608:
URL: https://github.com/apache/hudi/pull/7608#discussion_r1064076345


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/bulk/RowDataKeyGen.java:
##########
@@ -134,7 +155,9 @@ public HoodieKey getHoodieKey(RowData rowData) {
   }
 
   public String getRecordKey(RowData rowData) {
-    if (this.simpleRecordKey) {
+    if (!hasRecordKey) {
+      return DEFAULT_RECORD_KEY;
+    } else if (this.simpleRecordKey) {

Review Comment:
   Not sure if remove the pk field will cause error somewhere, and write a 
identical value should use very low storage in columnar file format like 
parquet, and UUID will use much more space since its uniq so cannot compress 
well, and i don't know where we can use uuid, so i think maybe store a 
identical value for pk is better.
   
   I change default key value to RowDataKeyGen.EMPTY_RECORDKEY_PLACEHOLDER 
since empty row key will report error.



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

Reply via email to