-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
Description
- not supported by Spark:
sealed trait A
final case class B(b: Int) extends A
final case class C(c: String) extends A
spark.createDataset(Seq(B(1), C("c")))
// java.lang.NoClassDefFoundError: no Java class corresponding to Product with Serializable with A found-
might still be useful if not converting to dataset / see if frameless can be useful here
-
should either be:
StructType(
StructField("B", StructType(StructField("b", IntegerType) :: Nil) ::
StructField("C", StructType(StructField("c", StringType) :: Nil) :: Nil
)or flattened set:
StructType(
StructField("b", IntegerType) ::
StructField("c", StringType) :: Nil
)gregosaurus