wzx140 commented on code in PR #5522:
URL: https://github.com/apache/hudi/pull/5522#discussion_r873623863


##########
hudi-common/src/main/java/org/apache/hudi/common/util/SpillableMapUtils.java:
##########
@@ -130,8 +130,11 @@ public static <R> R 
convertToHoodieRecordPayload(GenericRecord record, String pa
                                                    boolean withOperationField,
                                                    Option<String> 
partitionName) {
     final String recKey = 
record.get(recordKeyPartitionPathFieldPair.getKey()).toString();
-    final String partitionPath = (partitionName.isPresent() ? 
partitionName.get() :
-        record.get(recordKeyPartitionPathFieldPair.getRight()).toString());
+    String partitionPath = "";
+    if (recordKeyPartitionPathFieldPair.getRight() != null) {
+      partitionPath = (partitionName.isPresent() ? partitionName.get() :
+          record.get(recordKeyPartitionPathFieldPair.getRight()).toString());

Review Comment:
   Sorry, these code is unnecessary. And I will remove them.



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