The user facing type mapping is documented here: http://spark.apache.org/docs/latest/sql-programming-guide.html#data-types
On Fri, Oct 23, 2015 at 12:10 PM, Benyi Wang <bewang.t...@gmail.com> wrote: > If I have two columns > > StructType(Seq( > StructField("id", LongType), > StructField("phones", ArrayType(StringType)))) > > I want to add index for “phones” before I explode it. > > Can this be implemented as GenericUDF? > > I tried DataFrame.explode. It worked for simple types like string, but I > could not figure out how to handle a nested type like StructType. > > Can somebody shed a light? > > I’m using spark 1.5.1. > >