yihua commented on code in PR #12869:
URL: https://github.com/apache/hudi/pull/12869#discussion_r1972480964
##########
hudi-common/src/main/java/org/apache/hudi/common/table/timeline/versioning/v1/ArchivedTimelineV1.java:
##########
@@ -195,38 +249,47 @@ private InstantsLoader(boolean loadInstantDetails) {
@Override
public void accept(String instantTime, GenericRecord record) {
- HoodieInstant instant = readCommit(instantTime, record,
loadInstantDetails);
- instantsInRange.putIfAbsent(instant.requestedTime(), instant);
+ Option<HoodieInstant> instant = readCommit(instantTime, record,
loadInstantDetails, null);
+ if (instant.isPresent()) {
+ instantsInRange.computeIfAbsent(instant.get().requestedTime(), s ->
new ArrayList());
+ instantsInRange.get(instant.get().requestedTime()).add(instant.get());
Review Comment:
Can be simplified into one line
--
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]