databricks / spark-xml

XML data source for Spark SQL and DataFrames
Apache License 2.0
505 stars 227 forks source link

Return null for primitive types when value matches nullValue string #542

Closed srowen closed 3 years ago

srowen commented 3 years ago

Closes #540

While the code did handle detection of input matching the nullValue and returning null, in paths where the column type was a primitive in Java like DoubleType, the cast turned it into 0.0. This adds additional checking to perform the same check earlier.