voonhous commented on code in PR #19865:
URL: https://github.com/apache/hudi/pull/19865#discussion_r3964918695
##########
hudi-hadoop-common/src/test/java/org/apache/hudi/common/util/TestClusteringUtils.java:
##########
@@ -171,23 +174,38 @@ false, replaceInflight, new
HoodieReplaceCommitMetadata(), metaClient.getActiveT
assertEquals(HoodieTimeline.REPLACE_COMMIT_ACTION,
instant.getAction()));
}
- // replacecommit.inflight doesn't have clustering plan.
- // Verify that getClusteringPlan fetches content from corresponding
requested file.
- @Disabled("Will fail due to avro issue AVRO-3789. This is fixed in avro
1.11.3")
- @Test
- public void testClusteringPlanInflight() throws Exception {
+ // The inflight instant file carries no clustering plan, so
getClusteringPlan has to read it from the
+ // corresponding requested file. Table version 8 and above write the instant
with the clustering action;
+ // table version 6 still writes it as a replacecommit (see
ClusteringPlanActionExecutor), which is the
+ // only shape that exercises the replacecommit arm of isClusteringInstant.
+ @ParameterizedTest
+ @ValueSource(booleans = {false, true})
+ public void testClusteringPlanInflight(boolean preTableVersion8) throws
Exception {
+ if (preTableVersion8) {
+ initMetaClient(true);
Review Comment:
Leaving as is: `createTableLayoutOnStorage` only creates missing dirs, so
the leftover `.hoodie/timeline/` is empty, and the V1 timeline lists `.hoodie`
with `listDirectEntries` filtered by instant extension
(`HoodieTableMetaClient.java:725`), so it never looks inside it. Same pattern
as `TestTimelineUtils` lines 712 and 739.
--
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]