Description
The string returned by StructType.toString is different between Scala 2.12 and 2.13.
- Scala 2.12
val st = StructType(StructField("a", IntegerType) :: Nil) st.toString res0: String = StructType(StructField(a,IntegerType,true)
- Scala 2.13
val st = StructType(StructField("a", IntegerType) :: Nil) st.toString val res0: String = Seq(StructField(a,IntegerType,true))
It's because the logic to make the prefix of the string was changed from Scala 2.13.
Scala 2.12: https://github.com/scala/scala/blob/v2.12.15/src/library/scala/collection/TraversableLike.scala#L804
Scala 2:13:https://github.com/scala/scala/blob/v2.13.5/src/library/scala/collection/Seq.scala#L46