title: Mask field of column(struct type) in Spark DataFrame
body: <p>I have a created a DataFrame from XML file. The created DataFrame has the below scheme.</p>
  
  <pre><code>val df = hiveContext.read.format("com.databricks.spark.xml").option("rowTag", row_tag_name).load(data_dir_path_xml)
  
  df.printSchema()
  
              root
               |-- samples: struct (nullable = true)
               |    |-- sample: array (nullable = true)
               |    |    |-- element: struct (containsNull = true)
               |    |    |    |-- abc: string (nullable = true)
               |    |    |    |-- def: long (nullable = true)
               |    |    |    |-- type: string (nullable = true)
               |-- abc: string (nullable = true)
  </code></pre>
  
  <p>I would like to mask the abc/def in the dataframe. </p>
  
  <p>I was able to get to the field i want using:</p>
  
  <pre><code>val abc = df.select($"samples.sample".getField("abc"))
  </code></pre>
  
  <p>But i want to mask  the field abc/def (replace abc field  with XXXX ) in the dataframe df. Please help me on this</p>