yihua commented on code in PR #17660:
URL: https://github.com/apache/hudi/pull/17660#discussion_r2652050195


##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/HoodieFileGroupReaderBasedFileFormat.scala:
##########
@@ -424,8 +430,14 @@ class HoodieFileGroupReaderBasedFileFormat(tablePath: 
String,
   override def inferSchema(sparkSession: SparkSession, options: Map[String, 
String], files: Seq[FileStatus]): Option[StructType] = {

Review Comment:
   This method, `inferSchema`, should only be invoked if the schema is not 
provided at the data source or relation level for Hudi.  I think we should 
consider throwing an exception or returning `None` for all file formats.



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