Description
Improvement/follow-on of https://issues.apache.org/jira/browse/SPARK-35290.
We use StructType.sameType to see if we need to recreate the struct, but this can lead to false positives if the structure is the same but the types are different, and will lead to simply creating a new struct that's exactly the same as the original. This can cause significant overhead when unioning multiple deeply nested nullable structs, as each time it's recreated it gets wrapped in a If(IsNull()). Only comparing the field names can lead to more efficient plans.
Attachments
Issue Links
- is related to
-
SPARK-35290 unionByName with null filling fails for some nested structs
- Resolved
- links to