voonhous commented on code in PR #19687:
URL: https://github.com/apache/hudi/pull/19687#discussion_r3850700500


##########
hudi-spark-datasource/hudi-spark4.0.x/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/Spark40HoodieParquetReadSupport.scala:
##########
@@ -92,6 +93,17 @@ object Spark40HoodieParquetReadSupport {
   private def reorderVariantType(t: Type): Type = {
     t match {
       case group: GroupType if isVariantGroup(group) =>
+        if (group.containsField("typed_value")) {

Review Comment:
   Split it out: `rejectShreddedVariants(schema, catalystSchema)` runs in 
`init` before the reorder and walks structs, arrays and maps anchored on 
catalyst `VariantType` (shape-only fallback without a catalyst schema); the 
reorder no longer throws and leaves a shredded group untouched. Unit cases: 
top-level with and without catalyst, nested `struct<inner: variant>` naming 
`'s.inner'`, and the same parquet shape typed as a plain struct left alone.



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