TengHuo commented on code in PR #4584:
URL: https://github.com/apache/hudi/pull/4584#discussion_r1031128713
##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/catalyst/catalog/HoodieCatalogTable.scala:
##########
@@ -164,12 +164,20 @@ class HoodieCatalogTable(val spark: SparkSession, val
table: CatalogTable) exten
val properties = new Properties()
properties.putAll(tableConfigs.asJava)
- HoodieTableMetaClient.withPropertyBuilder()
- .fromProperties(properties)
- .setTableName(table.identifier.table)
-
.setTableCreateSchema(SchemaConverters.toAvroType(finalSchema).toString())
- .setPartitionFields(table.partitionColumnNames.mkString(","))
- .initTable(hadoopConf, tableLocation)
+ if (hoodieTableExists) {
+ // just persist hoodie.table.create.schema
+ HoodieTableMetaClient.withPropertyBuilder()
+ .fromProperties(properties)
+
.setTableCreateSchema(SchemaConverters.toAvroType(finalSchema).toString())
Review Comment:
Hi @YannByron
Recently, we found an Avro schema issue which is caused by the wrong record
name (detail here: https://github.com/apache/hudi/issues/7284).
May I ask if this line could cause the same problem? If so, we can discuss
how to fix it in PR: https://github.com/apache/hudi/pull/7297
--
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]