You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Xiao Li (JIRA)" <ji...@apache.org> on 2018/07/25 18:12:00 UTC
[jira] [Resolved] (SPARK-24849) Convert StructType to DDL string
[ https://issues.apache.org/jira/browse/SPARK-24849?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Xiao Li resolved SPARK-24849.
-----------------------------
Resolution: Fixed
Assignee: Maxim Gekk
Fix Version/s: 2.4.0
> Convert StructType to DDL string
> --------------------------------
>
> Key: SPARK-24849
> URL: https://issues.apache.org/jira/browse/SPARK-24849
> Project: Spark
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 2.3.1
> Reporter: Maxim Gekk
> Assignee: Maxim Gekk
> Priority: Minor
> Fix For: 2.4.0
>
>
> Need to add new methods which should convert a value of StructType to a schema in DDL format . It should be possible to use the former string in new table creation by just copy-pasting of new method results. The existing methods simpleString(), catalogString() and sql() put ':' between top level field name and its type, and wrap by the *struct* word
> {code}
> ds.schema.catalogString
> struct<metaData:struct<eventId:string ...
> {code}
> Output of new method should be
> {code}
> metaData struct<eventId:string ...
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org