Skip to content

Commit 24056b9

Browse files
committed
fix
1 parent 944a426 commit 24056b9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

sql/catalyst/src/main/scala/org/apache/spark/sql/types/DataType.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,8 +448,6 @@ object DataType {
448448

449449
fieldCompatible
450450

451-
case (_: NullType, _) => true
452-
453451
case (w: AtomicType, r: AtomicType) if storeAssignmentPolicy == STRICT =>
454452
if (!Cast.canUpCast(w, r)) {
455453
addError(s"Cannot safely cast '$context': $w to $r")
@@ -458,6 +456,8 @@ object DataType {
458456
true
459457
}
460458

459+
case (_: NullType, _) if storeAssignmentPolicy == ANSI => true
460+
461461
case (w: AtomicType, r: AtomicType) if storeAssignmentPolicy == ANSI =>
462462
if (!Cast.canANSIStoreAssign(w, r)) {
463463
addError(s"Cannot safely cast '$context': $w to $r")

0 commit comments

Comments
 (0)