rahil-c commented on code in PR #17573:
URL: https://github.com/apache/hudi/pull/17573#discussion_r2631926898
##########
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)
Review Comment:
Sure we can add another api in `TableSchemaResolver` that will basically
just delegate to the underlying getTableAvroSchemaFromDataFile? This is pattern
we have for example with `TableSchemaResolver #getTableSchema`
<img width="856" height="305" alt="Screenshot 2025-12-18 at 9 18 16 AM"
src="https://github.com/user-attachments/assets/92374812-c8f2-4cdb-97b0-fd67d14c8e5f"
/>
--
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]