Skip to content

Commit

Permalink
Make the condition better
Browse files Browse the repository at this point in the history
  • Loading branch information
HyukjinKwon committed Nov 5, 2016
1 parent 4132075 commit c0667d1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,8 @@ private[csv] object CSVTypeCast {
castType: DataType,
nullable: Boolean = true,
options: CSVOptions = CSVOptions()): Any = {

if (datum == null || nullable && datum == options.nullValue) {
val isNull = datum == options.nullValue || datum == null
if (nullable && isNull) {
null
} else {
castType match {
Expand Down

0 comments on commit c0667d1

Please sign in to comment.