cshuo commented on code in PR #13536:
URL: https://github.com/apache/hudi/pull/13536#discussion_r2196744334
##########
hudi-client/hudi-spark-client/src/test/java/org/apache/hudi/table/action/compact/CompactionTestBase.java:
##########
@@ -140,9 +146,11 @@ protected List<HoodieRecord>
runNextDeltaCommits(SparkRDDWriteClient client, fin
assertNoWriteErrors(statusList);
metaClient = createMetaClient(cfg.getBasePath());
HoodieTable hoodieTable = getHoodieTable(metaClient, cfg);
- List<HoodieBaseFile> dataFilesToRead =
getCurrentLatestBaseFiles(hoodieTable);
- assertTrue(dataFilesToRead.stream().findAny().isPresent(),
- "should list the base files we wrote in the delta commit");
+ if (hasBaseFile) {
Review Comment:
IIUC, you're suggesting such test case.
```
@Test
public void
testNotScheduleCompactionWithOldTimestampForLogsOnlyFileSlice() throws
Exception {
...
final String firstInstantTime = "001";
final String secondInstantTime = "004";
final String compactionInstantTime = "003";
...
assertNull(tryScheduleCompaction(compactionInstantTime, client, cfg),
"Compaction Instant can be scheduled with older timestamp");
}
```
This case can pass without the fix in this PR, since it's already covered in
the following check.
https://github.com/apache/hudi/blob/aa3dcd83fe660daff4d061be7459ddf02d038696/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/compact/plan/generators/BaseHoodieCompactionPlanGenerator.java#L170
I'm actually trying to reproduce the corner case in
https://github.com/apache/hudi/issues/13534, where there is no base file for a
file slice, and all logs are filtered out by complete time.
--
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]