voonhous commented on issue #18021:
URL: https://github.com/apache/hudi/issues/18021#issuecomment-3810631006

   More context:
   When there's an InternalSchema, `HoodieHadoopFsRelationFactory` might 
resolve to a HoodieSchema that has the Variant logical type in:
   
   ```java
   protected lazy val (tableSchema: HoodieSchema, internalSchemaOpt: 
Option[InternalSchema]) = {
   ```
   
   and hence:
   ```java
   protected lazy val tableStructSchema: StructType = {
       val converted = 
HoodieSchemaConversionUtils.convertHoodieSchemaToStructType(tableSchema)
       val metaFieldMetadata = sparkAdapter.createCatalystMetadataForMetaField
   
       // NOTE: Here we annotate meta-fields with corresponding metadata such 
that Spark (>= 3.2)
       //       is able to recognize such fields as meta-fields
       StructType(converted.map { field =>
         if (metaFieldNames.exists(metaFieldName => resolver(metaFieldName, 
field.name))) {
           field.copy(metadata = metaFieldMetadata)
         } else {
           field
         }
       })
     }
   ```
   
   This might resolve to a Variant type in Spark3.5, which might throw an 
error. 
   
   We need to verify if this is true and add a test to guard against this.


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