Commit 0f36edc
[SPARK-51624][SQL] Propagate GetStructField metadata in CreateNamedStruct.dataType
### What changes were proposed in this pull request?
This change intends to propagate GetStructField metadata in CreateNamedStruct.dataType.
### Why are the changes needed?
This is important because dataType comparisons are important for optimizer rules such as SimplifyCasts, which can cascade down to more expression optimizations.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Added unit test.
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #50412 from andylam-db/simplify-casts-comp.
Lead-authored-by: Andy Lam <andy.lam@databricks.com>
Co-authored-by: Wenchen Fan <cloud0fan@gmail.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>1 parent ab4bf8c commit 0f36edc
File tree
2 files changed
+17
-2
lines changed- sql
- catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions
- core/src/test/scala/org/apache/spark/sql
2 files changed
+17
-2
lines changedLines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
457 | 457 | | |
458 | 458 | | |
459 | 459 | | |
| 460 | + | |
460 | 461 | | |
461 | 462 | | |
462 | 463 | | |
| |||
Lines changed: 16 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
174 | 188 | | |
0 commit comments