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 11:01:16 UTC
[jira] [Updated] (SPARK-7701) UDT not working
[ https://issues.apache.org/jira/browse/SPARK-7701?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
bogdan baraila updated SPARK-7701:
----------------------------------
Description:
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:
{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}
was:
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()
}
> 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 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:
> {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