HyukjinKwon commented on a change in pull request #30851: URL: https://github.com/apache/spark/pull/30851#discussion_r546640810
########## File path: sql/catalyst/src/main/scala/org/apache/spark/sql/types/StructType.scala ########## @@ -445,10 +445,8 @@ case class StructType(fields: Array[StructField]) extends DataType with Seq[Stru stringConcat.toString } - override def sql: String = { - val fieldTypes = fields.map(f => s"${quoteIdentifier(f.name)}: ${f.dataType.sql}") - s"STRUCT<${fieldTypes.mkString(", ")}>" - } + override def sql: String = + s"STRUCT<${fields.map(_.toDDL.replaceFirst(" ", ": ")).mkString(", ")}>" Review comment: Hm, `replaceFirst(" ", ": ")`. Wouldn't it replace the field that has a space in the middle? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org