title: SparkSQL : Can I explode two different variables in the same query?
body: <p>I have the following explode query, which works fine:</p>
  
  <pre><code>data1 = sqlContext.sql("select explode(names) as name from data")
  </code></pre>
  
  <p>I want to explode another field "colors", so the final output could be the cartesian product of names and colors. So I did:</p>
  
  <pre><code>data1 = sqlContext.sql("select explode(names) as name, explode(colors) as color from data")
  </code></pre>
  
  <p>But I got the errors:</p>
  
  <pre><code> Only one generator allowed per select but Generate and and Explode found.;
  </code></pre>
  
  <p>Does any one have any idea?</p>
  
  <hr>
  
  <p>I can actually make it work by doing two steps:</p>
  
  <pre><code>   data1 = sqlContext.sql("select explode(names) as name from data")
     data1.registerTempTable('data1')
     data1 = sqlContext.sql("select explode(colors) as color from data1")
  </code></pre>
  
  <p>But I am wondering if it is possible to do it in one step? Thanks a lot!</p>