rahil-c commented on code in PR #18146:
URL: https://github.com/apache/hudi/pull/18146#discussion_r2867602601


##########
hudi-common/src/test/java/org/apache/hudi/common/schema/TestHoodieSchemaType.java:
##########
@@ -224,4 +227,26 @@ private static Schema createVariantSchemaForTest() {
     HoodieSchema.VariantLogicalType.variant().addToSchema(variantRecord);
     return variantRecord;
   }
+
+  /**
+   * Creates a vector schema manually using Avro APIs.
+   *
+   * @return a vector FIXED schema with VectorLogicalType metadata
+   */
+  private static Schema createVectorSchemaForTest() {
+    int dimension = 128;
+    String elementType = HoodieSchema.Vector.VectorElementType.FLOAT.name();
+    String storageBacking = 
HoodieSchema.Vector.StorageBacking.FIXED_BYTES.name();
+
+    int fixedSize = dimension * 4;
+    // Create FIXED schema directly
+    Schema vectorSchema = Schema.createFixed("vector", null, null, fixedSize);
+
+    // Apply VectorLogicalType with metadata
+    HoodieSchema.VectorLogicalType vectorLogicalType =
+        new HoodieSchema.VectorLogicalType(dimension, elementType, 
storageBacking);
+    vectorLogicalType.addToSchema(vectorSchema);
+
+    return vectorSchema;
+  }
 }

Review Comment:
   Nice will add these cases thanks @voonhous !



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