the-other-tim-brown commented on code in PR #13313:
URL: https://github.com/apache/hudi/pull/13313#discussion_r2098976121
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/index/HoodieIndexUtils.java:
##########
@@ -251,15 +257,52 @@ public static HoodieIndex
createUserDefinedIndex(HoodieWriteConfig config) {
*/
private static <R> HoodieData<HoodieRecord<R>> getExistingRecords(
HoodieData<Pair<String, String>> partitionLocations, HoodieWriteConfig
config, HoodieTable hoodieTable) {
- final Option<String> instantTime = hoodieTable
- .getMetaClient()
+ HoodieTableMetaClient metaClient = hoodieTable.getMetaClient();
+ final Option<String> instantTime = metaClient
.getActiveTimeline() // we need to include all actions and completed
.filterCompletedInstants()
.lastInstant()
.map(HoodieInstant::requestedTime);
- return partitionLocations.flatMap(p
- -> new HoodieMergedReadHandle(config, instantTime, hoodieTable,
Pair.of(p.getKey(), p.getValue()))
Review Comment:
Right but that defeats the purpose of unifying the reader logic. The new
reader can also limit the fields read from the file.
--
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]