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


##########
hudi-hadoop-common/src/test/java/org/apache/parquet/avro/TestAvroSchemaConverter.java:
##########
@@ -119,6 +119,22 @@ private void testAvroToParquetConversion(Configuration 
conf, HoodieSchema schema
     assertEquals(expectedMT.toString(), messageType.toString());
   }
 
+  /**
+   * The VARIANT logical type annotation the converter stamps on variant 
groups on parquet 1.16+
+   * (Spark 4.1+ profiles), as {@code GroupType.toString()} renders it; empty 
on older parquet,
+   * where the annotation type does not exist and groups stay plain. {@code 
MessageTypeParser}
+   * cannot parse the annotation, so variant expectations are compared against 
the converter's
+   * {@code toString()} directly rather than through {@link 
#testAvroToParquetConversion}.
+   */
+  private static String variantAnnotation() {
+    return AvroSchemaConverterWithTimestampNTZ.isVariantLogicalTypeSupported() 
? " (VARIANT(1))" : "";

Review Comment:
   Restored the independent probe in `variantAnnotation()` in b82f25694437, and 
gave `TestHoodieAvroWriteSupportShredding` the same treatment (it branched on 
the production probe too). `isVariantLogicalTypeSupported()` lost its last 
caller and is deleted.
   



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