felipepessoto opened a new pull request, #12444:
URL: https://github.com/apache/gluten/pull/12444

   ## What changes are proposed in this pull request?
   
   Velox has no Arrow representation for `VariantType`, so the native columnar 
write path -- which
   converts incoming rows to Velox batches via 
`RowToVeloxColumnarExec.toArrowSchema` -- throws
   `UnsupportedOperationException: Unsupported data type: variant` at runtime. 
This broke every Delta
   write whose schema contains a variant column (INSERT, UPDATE, MERGE, 
OPTIMIZE/auto-compact,
   checkpoint-driven rewrites), because 
`GlutenOptimisticTransaction.writeFiles` always offloaded the
   write to the native writer.
   
   This PR guards `GlutenOptimisticTransaction.writeFiles`: if the input schema 
contains a variant at
   any nesting level, it delegates to `super.writeFiles` (the vanilla Delta 
write path) instead of
   offloading to Velox. Non-variant writes are unaffected. The check matches by 
type name so it stays
   source-compatible across Spark versions.
   
   ## How was this patch tested?
   
   Adds `GlutenDeltaVariantWriteSuite` (backends-velox, delta-4.0) covering 
top-level, struct-nested,
   and UPDATE variant writes, asserting that the data is written and read back 
correctly.
   
   ## Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: GitHub Copilot CLI (Claude Opus 4.8)
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to