jonvex commented on code in PR #12422:
URL: https://github.com/apache/hudi/pull/12422#discussion_r1870378956


##########
hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/spark/sql/hudi/command/MergeIntoHoodieTableCommand.scala:
##########
@@ -435,20 +436,21 @@ case class MergeIntoHoodieTableCommand(mergeInto: 
MergeIntoTable) extends Hoodie
     // validate that we can support partial updates
     if (writePartialUpdates) {
       if (hoodieCatalogTable.tableConfig.getBootstrapBasePath.isPresent) {
-        throw new UnsupportedOperationException("Partial updates are not 
supported for bootstrap tables.")
+        throw new HoodieNotSupportedException("Partial updates are not 
supported for bootstrap tables.")
       }
 
       if (!hoodieCatalogTable.tableConfig.populateMetaFields()) {
-        throw new UnsupportedOperationException("Partial updates are not 
supported for virtual key tables.")
+        throw new HoodieNotSupportedException("Partial updates are not 
supported for virtual key tables.")
       }
 
-      if 
(HoodieAvroUtils.containsUnsupportedTypesForFileGroupReader(fullSchema)) {
-        throw new UnsupportedOperationException("Partial updates are not 
supported for tables with enum columns")
+      val tableSchemaResolver = new 
TableSchemaResolver(hoodieCatalogTable.metaClient)

Review Comment:
   No, this is because full schema is from 
   ```
     private def getTableSchema: Schema = {
       val (structName, nameSpace) = AvroConversionUtils
         .getAvroRecordNameAndNamespace(hoodieCatalogTable.tableName)
       AvroConversionUtils.convertStructTypeToAvroSchema(
         new StructType(targetTableSchema), structName, nameSpace)
     }
   ```
   spark schema doesn't have enums, so when we convert to avro, the enum field 
a string field. So containsUnsupportedTypesForFileGroupReader will never return 
true. We need to get the table schema directly from avro



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