yihua commented on code in PR #12669:
URL: https://github.com/apache/hudi/pull/12669#discussion_r1934820450
##########
hudi-common/src/test/java/org/apache/hudi/common/table/read/TestHoodieFileGroupReaderBase.java:
##########
@@ -155,13 +155,14 @@ public void
testReadLogFilesOnlyInMergeOnReadTable(RecordMergeMode recordMergeMo
// Use InMemoryIndex to generate log only mor table
writeConfigs.put("hoodie.index.type", "INMEMORY");
+
try (HoodieTestDataGenerator dataGen = new
HoodieTestDataGenerator(0xDEEF)) {
- // One commit; reading one file group containing a base file only
- commitToTable(dataGen.generateInserts("001", 100), INSERT.value(),
writeConfigs);
+ // One commit: reading one file group containing 1 log file only.
+ commitToTable(dataGen.generateInserts("001", 100), UPSERT.value(),
writeConfigs);
Review Comment:
Could you add a validation on the precondition that there is no base file
after each commit?
##########
hudi-client/hudi-java-client/src/main/java/org/apache/hudi/table/action/commit/BaseJavaCommitActionExecutor.java:
##########
@@ -268,6 +269,10 @@ public Iterator<List<WriteStatus>> handleInsert(String
idPfx, Iterator<HoodieRec
LOG.info("Empty partition");
return Collections.singletonList((List<WriteStatus>)
Collections.EMPTY_LIST).iterator();
}
+ if (table.getIndex().canIndexLogFiles()) {
+ return new JavaLazyInsertIterable<>(recordItr, true, config,
instantTime, table, idPfx,
+ taskContextSupplier, new AppendHandleFactory());
+ }
Review Comment:
Should this be put into `BaseJavaDeltaCommitActionExecutor`? COW with
commit action should not use append handle.
--
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]