You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/09/01 09:27:22 UTC

[GitHub] [hudi] dongkelun commented on a diff in pull request #6409: [HUDI-4629] Create hive table from existing hoodie table failed when the table schema is not defined

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


##########
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:
   > this already handled in `parseSchemaAndConfigs()` , isn't it?
   yes
   



-- 
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-unsubscribe@hudi.apache.org

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