voonhous commented on code in PR #18944:
URL: https://github.com/apache/hudi/pull/18944#discussion_r3385434604


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/source/split/HoodieSourceSplitSerializer.java:
##########
@@ -103,13 +103,13 @@ public byte[] serialize(HoodieSourceSplit obj) throws 
IOException {
           out.writeBoolean(false);
         }
 
-        out.writeBoolean(instantRange.getStartInstant().isPresent());
-        if (instantRange.getStartInstant().isPresent()) {
-          out.writeUTF(instantRange.getStartInstant().get());
+        out.writeBoolean(instantRange.getStartInstantOpt().isPresent());

Review Comment:
   `InstantRange` is not annotated with `@PublicAPIClass`/`@PublicAPIMethod`, 
so it is not part of the maintained public API surface, and the new names 
follow the existing field names (`startInstantOpt`/`endInstantOpt`) while 
making the `Option` return type explicit at call sites.
   
   Keeping the old getter names by renaming the fields instead would not be 
safe: `InstantRange` is held in Flink checkpoint state via Java serialization 
(`StreamReadOperator` uses `ListState<MergeOnReadInputSplit>` with 
`JavaSerializer`), so a field rename could break savepoint restores across 
versions.
   
   Updated the PR description to call out the rename for downstream consumers.



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