I have a weird issue where the schema is created OK when using it straight on with a case class but is empty when I try to create a more generic method:
test("schemaOf"):
Using.resource(Sessions.newSparkSession()): spark =>
val sp = new SparkSessionExt(spark)
val schema = sp.schemaOf[Person]
println(schema)
schema.toList.size should be(2)
I have a weird issue where the schema is created OK when using it straight on with a case class but is empty when I try to create a more generic method:
Then I have a
and this test fails:
the println prints
StructType()
Is this a bug or am I doing something wrong?