title: In spark iterate through each column and find the max length
body: <p>I am new to spark scala and I have following situation as below
  I have a table "TEST_TABLE" on cluster(can be hive table)
  I am converting that to dataframe
  as:</p>
  
  <pre><code>scala&gt; val testDF = spark.sql("select * from TEST_TABLE limit 10")
  </code></pre>
  
  <p>Now the DF can be viewed as </p>
  
  <pre><code>scala&gt; testDF.show()
  
  COL1|COL2|COL3  
  ----------------
  abc|abcd|abcdef 
  a|BCBDFG|qddfde 
  MN|1234B678|sd
  </code></pre>
  
  <p>I want an output like below</p>
  
  <pre><code>COLUMN_NAME|MAX_LENGTH
         COL1|3
         COL2|8
         COL3|6
  </code></pre>
  
  <p>Is this feasible to do so in spark scala?</p>