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


##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/hudi/TestTableSchemaResolverWithSparkSQL.scala:
##########
@@ -122,10 +122,11 @@ class TestTableSchemaResolverWithSparkSQL extends 
HoodieSparkWriterTestBase {
     metaClient.reloadActiveTimeline()
     var tableSchemaResolverParsingException: Exception = null
     try {
-      val schemaFromData = new 
TableSchemaResolver(metaClient).getTableAvroSchemaFromDataFile
-      val structFromData = 
AvroConversionUtils.convertAvroSchemaToStructType(HoodieAvroUtils.removeMetadataFields(schemaFromData))
-      val schemeDesign = new Schema.Parser().parse(schemaString)
-      val structDesign = 
AvroConversionUtils.convertAvroSchemaToStructType(schemeDesign)
+      val schemaFromData = HoodieSchema.fromAvroSchema(
+        new TableSchemaResolver(metaClient).getTableAvroSchemaFromDataFile)
+      val structFromData = 
HoodieSchemaConversionUtils.convertHoodieSchemaToStructType(org.apache.hudi.common.schema.HoodieSchemaUtils.removeMetadataFields(schemaFromData))

Review Comment:
   see comment https://github.com/apache/hudi/pull/17573#discussion_r2631877261



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