Github user cloud-fan commented on a diff in the pull request: https://github.com/apache/spark/pull/21550#discussion_r195192799 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/types/DataType.scala --- @@ -110,6 +111,8 @@ abstract class DataType extends AbstractDataType { @InterfaceStability.Stable object DataType { + def fromDDL(ddl: String): DataType = CatalystSqlParser.parseDataType(ddl) --- End diff -- I think it's reasonable for `DataType.fromDDL` to also support table style schema like `a int, b long`. How about we put the try catch here and other places just need to call `DataType.fromDDL`?
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org