YannByron commented on code in PR #6409:
URL: https://github.com/apache/hudi/pull/6409#discussion_r974381055


##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/catalyst/catalog/HoodieCatalogTable.scala:
##########
@@ -129,7 +129,17 @@ class HoodieCatalogTable(val spark: SparkSession, var 
table: CatalogTable) exten
   /**
    * Table schema
    */
-  lazy val tableSchema: StructType = table.schema
+  lazy val tableSchema: StructType = if (table.schema.nonEmpty) {

Review Comment:
   I prefer to call `loadTableSchemaByMetaClient` directly without having to 
decide if `table.schema` is empty.
   Parsing the metadata on spark does not need to depend on the meta from 
metastore.



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