HuangZhenQiu commented on code in PR #18212:
URL: https://github.com/apache/hudi/pull/18212#discussion_r2838622366
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/source/split/HoodieSourceSplitSerializer.java:
##########
@@ -82,6 +83,21 @@ public byte[] serialize(HoodieSourceSplit obj) throws
IOException {
// Serialize fileOffset
out.writeInt(obj.getFileOffset());
+ // Serialize instant range (Option<InstantRange>)
+ out.writeBoolean(obj.getInstantRange().isPresent());
+ if (obj.getInstantRange().isPresent()) {
+ InstantRange instantRange = obj.getInstantRange().get();
+ out.writeBoolean(instantRange.getStartInstant().isPresent());
+ if (instantRange.getStartInstant().isPresent()) {
+ out.writeUTF(instantRange.getStartInstant().get());
+ }
+ out.writeBoolean(instantRange.getEndInstant().isPresent());
+ if (instantRange.getEndInstant().isPresent()) {
+ out.writeUTF(instantRange.getEndInstant().get());
+ }
+ out.writeUTF(InstantRange.getRangeType(instantRange).name());
Review Comment:
This it is newly added in V2. 1.2 will be the first release.
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/source/split/HoodieSourceSplitSerializer.java:
##########
@@ -82,6 +83,21 @@ public byte[] serialize(HoodieSourceSplit obj) throws
IOException {
// Serialize fileOffset
out.writeInt(obj.getFileOffset());
+ // Serialize instant range (Option<InstantRange>)
+ out.writeBoolean(obj.getInstantRange().isPresent());
+ if (obj.getInstantRange().isPresent()) {
+ InstantRange instantRange = obj.getInstantRange().get();
+ out.writeBoolean(instantRange.getStartInstant().isPresent());
+ if (instantRange.getStartInstant().isPresent()) {
+ out.writeUTF(instantRange.getStartInstant().get());
+ }
+ out.writeBoolean(instantRange.getEndInstant().isPresent());
+ if (instantRange.getEndInstant().isPresent()) {
+ out.writeUTF(instantRange.getEndInstant().get());
+ }
+ out.writeUTF(InstantRange.getRangeType(instantRange).name());
Review Comment:
Yes. This it is newly added in V2. 1.2 will be the first release.
--
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]