We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4132075 commit c0667d1Copy full SHA for c0667d1
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/csv/CSVInferSchema.scala
@@ -231,8 +231,8 @@ private[csv] object CSVTypeCast {
231
castType: DataType,
232
nullable: Boolean = true,
233
options: CSVOptions = CSVOptions()): Any = {
234
-
235
- if (datum == null || nullable && datum == options.nullValue) {
+ val isNull = datum == options.nullValue || datum == null
+ if (nullable && isNull) {
236
null
237
} else {
238
castType match {
0 commit comments