You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2023/01/08 03:27:01 UTC

[GitHub] [hudi] hbgstc123 commented on a diff in pull request #7608: [HUDI-5503]Optimize flink table factory option check

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

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