scala - Creating nested columns in spark columns with multiple rows -


i trying create nested column in spark dataframe -

a | b | [1,2, null] | [3, null, null] | [5,6,7] 

the printschema dataframe follows -

|--a: string (nullable = true) |--b: struct (nullable = true) |  |--x: long (nullable = true) |  |--y: long (nullable = true) |  |--z: long (nullable = true) 

i want dataframe nested -

a | b | [[1,2,null],[3,null,null],[5,6,7]] 

and printschema should give same result before. i've tried take first row array of fields , concatenate remaining rows not working. can suggest how can desired results ? in advance.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -