Commit 00a2e01
[SPARK-18058][SQL] [BRANCH-2.0]Comparing column types ignoring Nullability in Union and SetOperation
## What changes were proposed in this pull request?
The PR tries to fix [SPARK-18058](https://issues.apache.org/jira/browse/SPARK-18058) which refers to a bug that the column types are compared with the extra care about Nullability in Union and SetOperation.
This PR converts the columns types by setting all fields as nullable before comparison
## How was this patch tested?
regular unit test cases
Author: CodingCat <zhunansjtu@gmail.com>
Closes #15602 from CodingCat/branch-2.0.1 parent 0e0d83a commit 00a2e01
File tree
2 files changed
+24
-19
lines changed- sql/catalyst/src
- main/scala/org/apache/spark/sql/catalyst/plans/logical
- test/scala/org/apache/spark/sql/catalyst/analysis
2 files changed
+24
-19
lines changedLines changed: 10 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| 119 | + | |
| 120 | + | |
119 | 121 | | |
120 | 122 | | |
121 | 123 | | |
| |||
125 | 127 | | |
126 | 128 | | |
127 | 129 | | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
128 | 137 | | |
129 | 138 | | |
130 | 139 | | |
| |||
133 | 142 | | |
134 | 143 | | |
135 | 144 | | |
136 | | - | |
137 | | - | |
138 | 145 | | |
139 | 146 | | |
140 | 147 | | |
| |||
143 | 150 | | |
144 | 151 | | |
145 | 152 | | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | 153 | | |
155 | 154 | | |
156 | 155 | | |
| |||
171 | 170 | | |
172 | 171 | | |
173 | 172 | | |
174 | | - | |
175 | | - | |
176 | 173 | | |
177 | 174 | | |
178 | 175 | | |
179 | 176 | | |
180 | 177 | | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | 178 | | |
188 | 179 | | |
189 | 180 | | |
| |||
218 | 209 | | |
219 | 210 | | |
220 | 211 | | |
221 | | - | |
| 212 | + | |
222 | 213 | | |
223 | 214 | | |
224 | 215 | | |
| |||
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
377 | 377 | | |
378 | 378 | | |
379 | 379 | | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
380 | 394 | | |
0 commit comments