>
> As I've specified *.as[Person]* which does schema inferance then
> *"option("inferSchema","true")" *is redundant and not needed!
The resolution of fields is done by name, not by position for case
classes. This is what allows us to support more complex things like JSON
or nested structures.
I have a simple people.csv and following SimpleApp
people.csv
--
name,age
abc,22
xyz,32
Working Code
Object SimpleApp {}
case class Person(name: String, age: Long)
def main(args: Array[String]): Unit = {
val spark