You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hao Ren (JIRA)" <ji...@apache.org> on 2015/06/22 18:27:00 UTC

[jira] [Created] (SPARK-8527) StructType's Factory method does not work in java code

Hao Ren created SPARK-8527:
------------------------------

             Summary: StructType's Factory method does not work in java code
                 Key: SPARK-8527
                 URL: https://issues.apache.org/jira/browse/SPARK-8527
             Project: Spark
          Issue Type: Bug
          Components: SQL
    Affects Versions: 1.4.0
            Reporter: Hao Ren


According to the following line of code below:

https://github.com/apache/spark/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/types/StructType.scala#L209

The casting should be successful, however after type erasure, I encounter {{java.lang.ClassCastException}}:

Exception in thread "main" java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Lorg.apache.spark.sql.types.StructField;
	at org.apache.spark.sql.types.StructType$.apply(StructType.scala:209)

Am I missing anything ?



--
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