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


##########
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) {
+    table.schema
+  } else {
+    val schemaFromMetaOpt = loadTableSchemaByMetaClient()

Review Comment:
   @jinxing64 can you also have a look pls? given this is based on your 
previous change



-- 
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: commits-unsubscr...@hudi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to