nsivabalan commented on code in PR #5747: URL: https://github.com/apache/hudi/pull/5747#discussion_r890196839
########## hudi-hadoop-mr/src/main/java/org/apache/hudi/hadoop/realtime/RealtimeSplit.java: ########## @@ -107,9 +107,15 @@ default void writeToOutput(DataOutput out) throws IOException { } else { InputSplitUtils.writeBoolean(true, out); InputSplitUtils.writeString(virtualKeyInfoOpt.get().getRecordKeyField(), out); - InputSplitUtils.writeString(virtualKeyInfoOpt.get().getPartitionPathField(), out); + InputSplitUtils.writeBoolean(virtualKeyInfoOpt.get().getPartitionPathField().isPresent(), out); + if (virtualKeyInfoOpt.get().getPartitionPathField().isPresent()) { + InputSplitUtils.writeString(virtualKeyInfoOpt.get().getPartitionPathField().get(), out); + } InputSplitUtils.writeString(String.valueOf(virtualKeyInfoOpt.get().getRecordKeyFieldIndex()), out); - InputSplitUtils.writeString(String.valueOf(virtualKeyInfoOpt.get().getPartitionPathFieldIndex()), out); + // if partition path field exists, partition path field index should also exists. So, don't need another boolean Review Comment: will fix it. -- 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