Skip to content

Commit

Permalink
[SPARK-3966][SQL] Fix nullabilities of Cast related to DateType.
Browse files Browse the repository at this point in the history
Author: Takuya UESHIN <ueshin@happy-camper.st>

Closes apache#2820 from ueshin/issues/SPARK-3966 and squashes the following commits:

ca4a745 [Takuya UESHIN] Fix nullabilities of Cast related to DateType.
  • Loading branch information
ueshin authored and marmbrus committed Oct 20, 2014
1 parent e9c1afa commit 364d52b
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ case class Cast(child: Expression, dataType: DataType) extends UnaryExpression w
case (StringType, _: NumericType) => true
case (StringType, TimestampType) => true
case (StringType, DateType) => true
case (_: NumericType, DateType) => true
case (BooleanType, DateType) => true
case (DateType, _: NumericType) => true
case (DateType, BooleanType) => true
case _ => child.nullable
}

Expand Down

0 comments on commit 364d52b

Please sign in to comment.