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


##########
hudi-client/hudi-client-common/src/test/java/org/apache/hudi/index/TestHoodieIndexUtils.java:
##########
@@ -544,18 +520,17 @@ public void testIsEligibleForExpressionIndex() {
    */
   @Test
   public void testIsEligibleForExpressionIndexWithNullableFields() {
+    // An int with default 0 must have the int type defined first.
+    // If null is defined first, which HoodieSchema#createNullable does, an 
error will be thrown
+    HoodieSchema nullableIntWithDefault = 
HoodieSchema.createUnion(HoodieSchema.create(HoodieSchemaType.INT), 
HoodieSchema.create(HoodieSchemaType.NULL));

Review Comment:
   Nope, it's a restriction of Avro, here's the error if we use 
`HoodieSchema.createNullable`:
   
   <img width="1482" height="959" alt="image" 
src="https://github.com/user-attachments/assets/f2d81386-a308-4154-aa3d-dbb906769927";
 />
   



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