spark-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Denny Lee <denny.g....@gmail.com>
Subject Spark 1.3 RC1 Generate schema based on string of schema
Date Fri, 20 Feb 2015 15:51:32 GMT
In the Spark SQL 1.2 Programmers Guide, we can generate the schema based on
the string of schema via

val schema =
  StructType(
    schemaString.split(" ").map(fieldName => StructField(fieldName,
StringType, true)))

But when running this on Spark 1.3.0 (RC1), I get the error:

val schema =  StructType(schemaString.split(" ").map(fieldName =>
StructField(fieldName, StringType, true)))

<console>:26: error: not found: value StringType

       val schema =  StructType(schemaString.split(" ").map(fieldName =>
StructField(fieldName, StringType, true)))

I'm looking through the various datatypes within
org.apache.spark.sql.types.DataType
but thought I'd ask to see if I was missing something obvious here.

Thanks!
Denny

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message