I have a dataframe with schema like below
|-- aaa: string (nullable = true)
|-- bbb: long (nullable = false)
|-- ccc: string (nullable = true)
|-- ddd: string (nullable = true)
|-- eee: long (nullable = false)
Already i have results in val for the above .
I want to convert the schema as below using spark scala
|ddd:struct (nullable = true)
|-- aaa: string (nullable = true)
|-- bbb: string (nullable = true)
|-- ccc: string (nullable = true)
|-- eee: string (nullable = true)
Please help