You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "bogdan baraila (JIRA)" <ji...@apache.org> on 2015/05/18 10:59:59 UTC

[jira] [Created] (SPARK-7701) UDT not working

bogdan baraila created SPARK-7701:
-------------------------------------

             Summary: UDT not working
                 Key: SPARK-7701
                 URL: https://issues.apache.org/jira/browse/SPARK-7701
             Project: Spark
          Issue Type: Bug
          Components: SQL
    Affects Versions: 1.3.1, 1.3.0
            Reporter: bogdan baraila


Using a User Define Type fails with the next exception: 

ExamplePointUDT cannot be cast to org.apache.spark.sql.types.StructType
java.lang.ClassCastException: 
ExamplePointUDT cannot be cast to org.apache.spark.sql.types.StructType
	at org.apache.spark.sql.SQLContext.createDataFrame(SQLContext.scala:316)

I'm using a basic example using the ExamplePointUdt from spark framework:

  test("udt serialisation") {
    val points = Seq(new ExamplePoint(1.3, 1.6), new ExamplePoint(1.3, 1.8))
    val df = SparkContextForStdout.context.parallelize(points).toDF()
  }




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org