Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-24849

Convert StructType to DDL string

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.3.1
    • 2.4.0
    • SQL
    • None

    Description

      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

      ds.schema.catalogString
      struct<metaData:struct<eventId:string ...
      

      Output of new method should be

      metaData struct<eventId:string ...
      

      Attachments

        Activity

          People

            maxgekk Max Gekk
            maxgekk Max Gekk
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: