[ https://issues.apache.org/jira/browse/SPARK-37076?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17431421#comment-17431421 ]
Apache Spark commented on SPARK-37076: -------------------------------------- User 'sarutak' has created a pull request for this issue: https://github.com/apache/spark/pull/34341 > Implement StructType.toString explicitly for Scala 2.13 > ------------------------------------------------------- > > Key: SPARK-37076 > URL: https://issues.apache.org/jira/browse/SPARK-37076 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 3.3.0 > Environment: > Reporter: Kousuke Saruta > Assignee: Kousuke Saruta > Priority: Minor > > The string returned by StructType.toString is different between Scala 2.12 > and 2.13. > * Scala 2.12 > {code} > val st = StructType(StructField("a", IntegerType) :: Nil) > st.toString > res0: String = StructType(StructField(a,IntegerType,true) > {code} > * Scala 2.13 > {code} > val st = StructType(StructField("a", IntegerType) :: Nil) > st.toString > val res0: String = Seq(StructField(a,IntegerType,true)) > {code} > 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 -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org