LATERAL VIEW EXPLODE in Spark
For array type column, explode()
will convert it to n
rows, where n
is the number of elements in the array.
For map/dictionary type column, explode()
will convert it to nx2
shape, i.e., n rows, 2 columns (for key and value).