The provided example in this doc https://spark.apache.org/docs/1.4.0/api/java/org/apache/spark/sql/types/StructType.html for creating Row from Struct is wrong
// Create a Row with the schema defined by struct
val row = Row(Row(1, 2, true))
// row: Row =
the above example does not create a Row object with schema.
this error is in the scala docs too.