title: Why does posexplode fail with "AnalysisException: The number of aliases supplied in the AS clause does not match the number of columns..."?
body: <p>This is my dataframe:</p>
  
  <pre><code>+------------------------------------------
  |value   
  +------------------------------------------
  |[0.0, 1.0, 0.0, 7.0000000000000036, 0.0]
  |[2.0000000000000036, 0.0, 2.9999999999999996, 4.0000000000000036, 5.000000000000002]
  |[4.000000000000006, 0.0, 0.0, 6.000000000000006, 7.000000000000004]  
  +------------------------------------------
  </code></pre>
  
  <p>When I use:</p>
  
  <pre><code>dataFrame.withColumn("item_id", posexplode(dataFrame.col("value")))
  </code></pre>
  
  <p>I got this error:</p>
  
  <pre><code>org.apache.spark.sql.AnalysisException: The number of aliases supplied in the AS clause does not match the number of columns output by the UDTF expected 2 aliases but got item_id ;
  </code></pre>
  
  <p>So, how to use posexplode to "Creates a new row for each element with position in the given array or map column."</p>