Github user MaxGekk commented on the issue: https://github.com/apache/spark/pull/21803 > Does the alternative code I posted above work in that case? > You can use struct.map(field => s"${quoteIdentifier(field.name)} ${field.dataType.sql}").mkString(",") in the application code It is actually the same as in the PR. For sure, it works ( I added tests for that ;-) ) > or you could simply: > scala> DataType.fromDDL(StructType.fromDDL("a int").catalogString) Sorry, I didn't catch the example. Just in case, I need to read one avro file from a folder, take a schema from it in DDL format and create table by using the string. This is the use case. > If so, sounds we are adding an API just for consistency ... Not only, we are adding the method to cover the use case which I described above. And for consistency too. Having useful API, isn't it beautiful?
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org