Commit 9846dd8
[SPARK-54289][SQL][FOLLOW-UP] Make Merge Into update assignment by field default for UPDATE SET * and align configs
### What changes were proposed in this pull request?
Follow up of: #53149
1. Make the update assignment by field the Spark 4.1 behavior. For context, the case to allow assignment key and value to be different struct for MERGE INTO is new in Spark 4.1 so we have a chance to define the behavior. In Spark, nested fields are usually treated as top level column so it should follow the behavior: see #53149 (comment)
2. Rename existing config to control the struct type compatibility check in assignment. We do not need to mention 'source' as actually the assignment can be to anything, not necessarily to source table.
### Why are the changes needed?
See above
### Does this PR introduce _any_ user-facing change?
No, this feature is unreleased (allowing assignment source to be of different struct type as target)
### How was this patch tested?
Existing unit test
### Was this patch authored or co-authored using generative AI tooling?
No
Closes #53199 from szehon-ho/merge_schema_evolution_update_nested_follow.
Authored-by: Szehon Ho <szehon.apache@gmail.com>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>1 parent d14209c commit 9846dd8
File tree
4 files changed
+428
-511
lines changed- sql
- catalyst/src/main/scala/org/apache/spark/sql
- catalyst/analysis
- internal
- core/src/test/scala/org/apache/spark/sql/connector
4 files changed
+428
-511
lines changedLines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
| |||
183 | 182 | | |
184 | 183 | | |
185 | 184 | | |
186 | | - | |
| 185 | + | |
187 | 186 | | |
188 | 187 | | |
189 | 188 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
Lines changed: 1 addition & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6704 | 6704 | | |
6705 | 6705 | | |
6706 | 6706 | | |
6707 | | - | |
6708 | | - | |
6709 | | - | |
6710 | | - | |
6711 | | - | |
6712 | | - | |
6713 | | - | |
6714 | | - | |
6715 | | - | |
6716 | | - | |
6717 | | - | |
6718 | | - | |
6719 | 6707 | | |
6720 | 6708 | | |
6721 | 6709 | | |
| |||
7915 | 7903 | | |
7916 | 7904 | | |
7917 | 7905 | | |
7918 | | - | |
| 7906 | + | |
7919 | 7907 | | |
7920 | 7908 | | |
7921 | | - | |
7922 | | - | |
7923 | | - | |
7924 | 7909 | | |
7925 | 7910 | | |
7926 | 7911 | | |
| |||
0 commit comments