[ 
https://issues.apache.org/jira/browse/SPARK-7701?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14550143#comment-14550143
 ] 

Liang-Chi Hsieh commented on SPARK-7701:
----------------------------------------

I meant wrapping ExamplePoint in Products, not making it as case class.

> 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.0, 1.3.1
>            Reporter: bogdan baraila
>
> Using a UserDefinedType fails with the next exception: 
> {code}
> 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)
> {code}
> I'm using a basic example with the ExamplePointUdt from spark framework:
> {code}
>   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()
>   }
> {code}



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

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

Reply via email to