title: PySpark: Concatenate Two Columns with Datatype of 'Struc' --> Error: Cannot Resolve Due to Datatype Mismatch
body: <p>I have a data table in PySpark that contains two columns with data type of 'struc'.  </p>
  
  <p>Please see sample data frame below:     </p>
  
  <pre><code>word_verb                   word_noun
  {_1=cook, _2=VB}            {_1=chicken, _2=NN}
  {_1=pack, _2=VBN}           {_1=lunch, _2=NN}
  {_1=reconnected, _2=VBN}    {_1=wifi, _2=NN}
  </code></pre>
  
  <p>I want to concatenate the two columns together so I can do a frequency count of the concatenated verb and noun chunk.</p>
  
  <p>I tried the code below: </p>
  
  <pre><code>df = df.withColumn('word_chunk_final', F.concat(F.col('word_verb'), F.col('word_noun')))  
  </code></pre>
  
  <p>But I get the following error:</p>
  
  <pre><code>AnalysisException: u"cannot resolve 'concat(`word_verb`, `word_noun`)' due to data type mismatch: input to function concat should have been string, binary or array, but it's [struct&lt;_1:string,_2:string&gt;, struct&lt;_1:string,_2:string&gt;]
  </code></pre>
  
  <p>My desired output table is as follows.  The concatenated new field would have datatype of string: </p>
  
  <pre><code>word_verb                   word_noun               word_chunk_final
  {_1=cook, _2=VB}            {_1=chicken, _2=NN}     cook chicken
  {_1=pack, _2=VBN}           {_1=lunch, _2=NN}       pack lunch
  {_1=reconnected, _2=VBN}    {_1=wifi, _2=NN}        reconnected wifi 
  </code></pre>