Github user maropu commented on the issue:
https://github.com/apache/spark/pull/18200
Sorry for interrupting you though, is this a blocker for the v2.2 release?
It seems v2.1 accepts this case:
```
#cat test.csv
1,3
1
#./bin/spark-shell
Welcome to
____ __
/ __/__ ___ _____/ /__
_\ \/ _ \/ _ `/ __/ '_/
/___/ .__/\_,_/_/ /_/\_\ version 2.1.0
/_/
Using Scala version 2.11.8 (Java HotSpot(TM) 64-Bit Server VM, Java
1.8.0_31)
Type in expressions to have them evaluated.
Type :help for more information.
scala> import org.apache.spark.sql.types._
import org.apache.spark.sql.types._
scala> spark.read.schema(new StructType().add("a", IntegerType).add("b",
IntegerType)).csv("/Users/maropu/Desktop/test.csv").show
+---+----+
| a| b|
+---+----+
| 1| 3|
| 1|null|
+---+----+
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]