voonhous commented on code in PR #19253:
URL: https://github.com/apache/hudi/pull/19253#discussion_r3881749270


##########
hudi-client/hudi-client-common/src/test/java/org/apache/hudi/utils/TestCommonClientUtils.java:
##########
@@ -110,6 +116,47 @@ private static Stream<Arguments> 
provideWriteVersionNativeLogExpectations() {
     );
   }
 
+  /**
+   * Every base file format must map to a log block type: a case missing from 
the
+   * {@code getLogBlockType} switch only surfaces as a {@code HoodieException} 
on the first MOR
+   * log write, which is what happened for VORTEX (apache/hudi#19252). Sweeps 
the enum (never a
+   * hardcoded list); HOODIE_LOG is the log format itself and can never be a 
base file format.
+   */
+  // TODO: drop the VORTEX exclusion once apache/hudi#19252 adds the case (see 
testGetLogBlockTypeForVortex).
+  @ParameterizedTest
+  @EnumSource(value = HoodieFileFormat.class, mode = EnumSource.Mode.EXCLUDE, 
names = {"HOODIE_LOG", "VORTEX"})
+  void testGetLogBlockTypeMapsEveryBaseFileFormat(HoodieFileFormat format) {
+    assertNotNull(

Review Comment:
   Done in 37c870633a17: `expectedLogBlockType(format)` resolves the expected 
type through a switch with a failing `default` (`HFILE` -> `HFILE_DATA_BLOCK`, 
`PARQUET`/`ORC`/`LANCE`/`VORTEX` -> `AVRO_DATA_BLOCK`) and the test asserts 
equality. The VORTEX arm is already in place, so #19252 only needs to drop the 
`@EnumSource` exclusion; the body now carries a merge-order line.



-- 
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]

Reply via email to