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


##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/hudi/TestDataSourceDefaults.scala:
##########
@@ -625,14 +624,14 @@ class TestDataSourceDefaults extends 
ScalaAssertionSupport {
     val props = new TypedProperties()
     OrderingFieldsTestUtils.setOrderingFieldsConfig(props, key, 
"favoriteIntNumber")
     val baseOrderingVal: Object = baseRecord.get("favoriteIntNumber")
-    val fieldSchema: Schema = 
baseRecord.getSchema().getField("favoriteIntNumber").schema()
+    val fieldSchema: HoodieSchema = 
HoodieSchema.fromAvroSchema(baseRecord.getSchema().getField("favoriteIntNumber").schema())
 
-    val basePayload = new OverwriteWithLatestAvroPayload(baseRecord, 
HoodieAvroUtils.convertValueForSpecificDataTypes(fieldSchema, baseOrderingVal, 
false).asInstanceOf[Comparable[_]])
+    val basePayload = new OverwriteWithLatestAvroPayload(baseRecord, 
org.apache.hudi.common.schema.HoodieSchemaUtils.convertValueForSpecificDataTypes(fieldSchema,
 baseOrderingVal, false).asInstanceOf[Comparable[_]])

Review Comment:
   Without the prefix currently there is another `HoodieSchemaUtils` within the 
hudi spark module which compiler gets confused(see screenshot). 
https://github.com/apache/hudi/blame/master/hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieSchemaUtils.scala
   
   <img width="731" height="278" alt="Screenshot 2025-12-18 at 7 49 25 AM" 
src="https://github.com/user-attachments/assets/b6d01093-57df-4211-83c3-e67a758e008d";
 />
   
   
   i think we need to either rename the spark's HoodieSchemaUtils class to 
something else or use full qualified path to the new util we have in common.
   



##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/hudi/TestDataSourceDefaults.scala:
##########
@@ -625,14 +624,14 @@ class TestDataSourceDefaults extends 
ScalaAssertionSupport {
     val props = new TypedProperties()
     OrderingFieldsTestUtils.setOrderingFieldsConfig(props, key, 
"favoriteIntNumber")
     val baseOrderingVal: Object = baseRecord.get("favoriteIntNumber")
-    val fieldSchema: Schema = 
baseRecord.getSchema().getField("favoriteIntNumber").schema()
+    val fieldSchema: HoodieSchema = 
HoodieSchema.fromAvroSchema(baseRecord.getSchema().getField("favoriteIntNumber").schema())
 
-    val basePayload = new OverwriteWithLatestAvroPayload(baseRecord, 
HoodieAvroUtils.convertValueForSpecificDataTypes(fieldSchema, baseOrderingVal, 
false).asInstanceOf[Comparable[_]])
+    val basePayload = new OverwriteWithLatestAvroPayload(baseRecord, 
org.apache.hudi.common.schema.HoodieSchemaUtils.convertValueForSpecificDataTypes(fieldSchema,
 baseOrderingVal, false).asInstanceOf[Comparable[_]])
 
     val laterRecord = SchemaTestUtil
       .generateAvroRecordFromJson(schema, 2, "001", "f1")
     val laterOrderingVal: Object = laterRecord.get("favoriteIntNumber")
-    val newerPayload = new OverwriteWithLatestAvroPayload(laterRecord, 
HoodieAvroUtils.convertValueForSpecificDataTypes(fieldSchema, laterOrderingVal, 
false).asInstanceOf[Comparable[_]])
+    val newerPayload = new OverwriteWithLatestAvroPayload(laterRecord, 
org.apache.hudi.common.schema.HoodieSchemaUtils.convertValueForSpecificDataTypes(fieldSchema,
 laterOrderingVal, false).asInstanceOf[Comparable[_]])

Review Comment:
   see comment above



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