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


##########
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 whether we should use the empty string for the pk-less scenario, 
because all the records would have the same value primary key, which breaks the 
pk-less semantics, for pk-less, we actually mean all the records are unique, 
there is no need to define the primary key.
   
   Another solution is to use the UUID as the primary key, WDYT ?



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