You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Michael Armbrust (JIRA)" <ji...@apache.org> on 2015/05/19 21:09:00 UTC
[jira] [Resolved] (SPARK-7701) UDT not working
[ https://issues.apache.org/jira/browse/SPARK-7701?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Armbrust resolved SPARK-7701.
-------------------------------------
Resolution: Not A Problem
> 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-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org