title: infer schema with complex type
body: <p>I gave a text file with complex type column. Could you please tell about automatically inferring schema with array, map and structure type in Spark.</p>
  <p>Source:</p>
  <pre><code> name,work_place,gender_age,skills_score,depart_title,work_contractor
  Michael|Montreal,Toronto|Male,30|DB:80|Product:Developer^DLead
  Will|Montreal|Male,35|Perl:85|Product:Lead,Test:Lead
  Shelley|New York|Female,27|Python:80|Test:Lead,COE:Architect
  Lucy|Vancouver|Female,57|Sales:89,HR:94|Sales:Lead
  </code></pre>
  <p>code example:</p>
  <pre><code>  val employeeComplexDF = spark
      .read
      .option(&quot;header&quot;, &quot;true&quot;)
      .option(&quot;inferSchema&quot;, &quot;true&quot;)
      .csv(&quot;src/main/resources/employee_complex/employee.txt&quot;)
  </code></pre>
  <p>parsed schema (fact):
  root
  |-- name: string (nullable = true)
  |-- work_place: string (nullable = true)
  |-- gender_age: string (nullable = true)
  |-- skills_score: string (nullable = true)
  |-- depart_title: string (nullable = true)
  |-- work_contractor: string (nullable = true)</p>
  <p>Expected schema is schema with ArrayType, ...</p>