yihua commented on code in PR #13670:
URL: https://github.com/apache/hudi/pull/13670#discussion_r2250246330
##########
hudi-common/src/main/java/org/apache/hudi/common/table/read/buffer/DefaultFileGroupRecordBufferLoader.java:
##########
@@ -59,7 +60,23 @@ public Pair<HoodieFileGroupRecordBuffer<T>, List<String>>
getRecordBuffer(Hoodie
ReaderParameters readerParameters,
HoodieReadStats readStats,
Option<BaseFileUpdateCallback<T>> fileGroupUpdateCallback) {
+ Option<FileGroupRecordBuffer<T>> recordBufferOpt =
getFileGroupRecordBuffer(readerContext, inputSplit, orderingFieldNames,
hoodieTableMetaClient, props,
+ readerParameters, readStats, fileGroupUpdateCallback);
+ return recordBufferOpt.map(recordBuffer -> Pair.of(recordBufferOpt.get(),
scanLogFiles(readerContext, storage, inputSplit, hoodieTableMetaClient, props,
+ readerParameters, readStats, recordBufferOpt.get())));
+ }
+ private Option<FileGroupRecordBuffer<T>>
getFileGroupRecordBuffer(HoodieReaderContext<T> readerContext,
+ InputSplit
inputSplit,
+ List<String>
orderingFieldNames,
+
HoodieTableMetaClient hoodieTableMetaClient,
+ TypedProperties
props,
+ ReaderParameters
readerParameters,
+ HoodieReadStats
readStats,
+
Option<BaseFileUpdateCallback<T>> fileGroupUpdateCallback) {
+ if (inputSplit.getLogFiles().isEmpty()) {
+ return Option.empty();
+ }
Review Comment:
nit: no need to separate the method out since
`DefaultFileGroupRecordBufferLoader` is not extended and there is no other
usage of the method?
--
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]