title: What is the alternate to posexplode() in Spark Sql as it doesn't take variable number of arguments dynamically?
body: <pre><code>val result = df.select($"seq_id", posexplode(array($"prod_id", $"prod_name")))
  </code></pre>
  
  <p>In above example posexplode doesn't take any sequence of column names in side array(). It is mandatory to hardcode the column names. Is there any way to remove hardcoding and add any number of columns dynamically?</p>