hudi-agent commented on code in PR #19865:
URL: https://github.com/apache/hudi/pull/19865#discussion_r3964865127
##########
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:
🤖 This re-inits a table version 6 layout on top of the version 8 table that
`@BeforeEach init()` already created at the same `basePath` —
`hoodie.properties` gets overwritten, but the v8 `.hoodie/timeline/` (and
`history/`) dirs stay behind while the v6 timeline now lives directly under
`.hoodie/`. It works today because instant scanning filters by extension, but
would a `@BeforeEach`-free setup (e.g. calling
`initMetaClient(preTableVersion8)` as the only init) be less fragile?
<sub><i>⚠️ AI-generated; verify before applying. React 👍/👎 to flag
quality.</i></sub>
--
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]