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

   ## What changes are proposed in this pull request?
   Delta column mapping remaps struct field names to physical UUIDs 
(col-<uuid>), but MERGE plan CaseWhen branches can mix physical and logical 
field names. Velox SWITCH requires exact type matching including field names, 
causing InvariantViolationException on MERGE with column-mapped struct columns:
   
   ```
    InvariantViolationException: VeloxRuntimeError
    Error Code: INVALID_STATE
    Reason: Else clause of a SWITCH statement must have the same type as 'then' 
clauses.
      Expected ROW<"col-e49d92e3-0b53-46a2-ba29-c928d381433d":INTEGER>,
      but got ROW<foo:INTEGER>
   ```
       
   This PR adds StructTypeReconciler that detects struct field name mismatches 
across conditional expression branches and wraps mismatched branches in ROW 
casts to normalize field names. Handles nested structs, arrays of structs, and 
maps.
   
   ## How was this patch tested?
   Added UT
   
   ## Was this patch authored or co-authored using generative AI tooling?
   
   No
   


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