Commit dad4d6a
committed
[SPARK-31229][SQL][TESTS] Add unit tests TypeCoercion.findTypeForComplex and Cast.canCast in null <> complex types
### What changes were proposed in this pull request?
This PR (SPARK-31229) is rather a followup of #27926 (SPARK-31166). It adds unittests for `TypeCoercion.findTypeForComplex` and `Cast.canCast` about struct, map and array with the respect to null types.
### Why are the changes needed?
To detect which scope was broken in the future easily.
### Does this PR introduce any user-facing change?
No, it's a test-only.
### How was this patch tested?
Unittests were added.
Closes #27990 from HyukjinKwon/SPARK-31166-followup.
Authored-by: HyukjinKwon <[email protected]>
Signed-off-by: HyukjinKwon <[email protected]>
(cherry picked from commit bd32400)
Signed-off-by: HyukjinKwon <[email protected]>1 parent 5c1e78f commit dad4d6a
File tree
2 files changed
+35
-0
lines changed- sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst
- analysis
- expressions
2 files changed
+35
-0
lines changedLines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
467 | 467 | | |
468 | 468 | | |
469 | 469 | | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
470 | 475 | | |
471 | 476 | | |
472 | 477 | | |
473 | 478 | | |
474 | 479 | | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
475 | 485 | | |
476 | 486 | | |
477 | 487 | | |
478 | 488 | | |
479 | 489 | | |
480 | 490 | | |
481 | 491 | | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
482 | 500 | | |
483 | 501 | | |
484 | 502 | | |
| |||
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1140 | 1140 | | |
1141 | 1141 | | |
1142 | 1142 | | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
1143 | 1160 | | |
1144 | 1161 | | |
1145 | 1162 | | |
| |||
0 commit comments