java.lang.ClassCastException: org.apache.spark.sql.types.ArrayType cannot be cast to org.apache.spark.sql.types.StructType

Stack Overflow | smeeb | 5 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Creating a Spark DataFrame from a single string

    Stack Overflow | 5 months ago | smeeb
    java.lang.ClassCastException: org.apache.spark.sql.types.ArrayType cannot be cast to org.apache.spark.sql.types.StructType

    Root Cause Analysis

    1. java.lang.ClassCastException

      org.apache.spark.sql.types.ArrayType cannot be cast to org.apache.spark.sql.types.StructType

      at org.apache.spark.sql.SQLContext.createDataFrame()
    2. Spark Project SQL
      SQLImplicits.rddToDataFrameHolder
      1. org.apache.spark.sql.SQLContext.createDataFrame(SQLContext.scala:413)
      2. org.apache.spark.sql.SQLImplicits.rddToDataFrameHolder(SQLImplicits.scala:155)
      2 frames