This works fine:
import org.apache.spark.sql.types.{StructType, StructField, StringType, IntegerType, DateType} import org.apache.spark.sql.functions._ val d