danny0405 commented on code in PR #9327: URL: https://github.com/apache/hudi/pull/9327#discussion_r1280310875
########## hudi-common/src/main/java/org/apache/hudi/common/model/HoodieRecordDelegate.java: ########## @@ -122,4 +127,20 @@ public String toString() { + ", newLocation=" + newLocation + '}'; } + + @Override + public final void write(Kryo kryo, Output output) { + kryo.writeObjectOrNull(output, hoodieKey, HoodieKey.class); + kryo.writeClassAndObject(output, currentLocation.isPresent() ? currentLocation.get() : null); + kryo.writeClassAndObject(output, newLocation.isPresent() ? newLocation.get() : null); + } + + @Override + public final void read(Kryo kryo, Input input) { + this.hoodieKey = kryo.readObjectOrNull(input, HoodieKey.class); + HoodieRecordLocation newrl = (HoodieRecordLocation) kryo.readClassAndObject(input); + this.currentLocation = newrl == null ? Option.empty() : Option.of(newrl); + HoodieRecordLocation oldrl = (HoodieRecordLocation) kryo.readClassAndObject(input); + this.newLocation = oldrl == null ? Option.empty() : Option.of(oldrl); + } Review Comment: Option.ofNullable ? Can we write some tests for 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