In Spark SQL, there\'re limited DataTypes for Schema, and there\'re limited Encoders for converting JVM objects to and from the internal Spark SQL representation.
Schema