title: Scala concatenate Column of Array[String] into single Array[String]
body: <p>I have a Spark Dataframe (Scala) with an <code>id - (Int)</code> and <code>tokens - (array&lt;string&gt;)</code> column:</p>
  
  <pre><code>id,tokens
  0,["a","b","c"]
  1,["a","b"]
  ...
  </code></pre>
  
  <p>Assuming I am able to retrieve the data via a SparkSession and casting to a case class:</p>
  
  <pre><code>case class Token(id: Int, tokens: Array[String])
  </code></pre>
  
  <p>After getting a <code>Dataset[Token]</code> object, how do I concatenate all the array of string tokens into a single <code>Array&lt;String&gt;</code> and subsequently perform a count to find the most occuring strings?</p>
  
  <p>Output:</p>
  
  <pre><code>a,2
  b,2
  c,1
  ...
  </code></pre>