Yes, this works... Thanks On Sun, Dec 20, 2015 at 3:57 PM Peter Zhang <[email protected]> wrote:
> Hi Eran, > > Missing import package. > > import org.apache.spark.sql.types._ > > will work. please try. > > Peter Zhang > -- > Google > Sent with Airmail > > On December 20, 2015 at 21:43:42, Eran Witkon ([email protected]) > wrote: > > Hi, > I am using spark-shell with version 1.5.2. > scala> sc.version > res17: String = 1.5.2 > > but when trying to use StructType I am getting error: > val struct = > StructType( > StructField("a", IntegerType, true) :: > StructField("b", LongType, false) :: > StructField("c", BooleanType, false) :: Nil) > > <console>:31: error: not found: value StructType > StructType( > > Why? > >
