title: Spark: reading files with PERMISSIVE and provided schema - issues with corrupted records column
body: <p>I am reading spark CSV. I am providing a schema for the file that I read and I read it permissive mode. I would like to keep all records in columnNameOfCorruptRecord (in my case corrupted_records).</p>
  
  <p>I went trough hell to set this up and still get warnings that I cannot suppress i there something I miss.</p>
  
  <p>So first in order to have the corrupted_records column I needed to add it to the schema as StringType. This is documented so okay. 
  But whenever I read a file a get a Warning that the schema doesn't match because the amount of columns is different. It's just a warning, but it's filling my logs.</p>
  
  <p>Also when there is a field that is not nullable and there is a corrupted record, the corrupted record goes to the corrupt_records column and all it's fields are set to null thus I get an exception because I have non nullable field. The only to solve this is to set that the columns are not nullable to nullable. Which is quite strange.</p>
  
  <p>Am I missing something?</p>
  
  <p>Recap:</p>
  
  <ol>
  <li>Is there a way to ignore the warning when I've added
  corrupted_records column in the schema </li>
  <li>Is there a way to use
  PERMISSIVE mode and corrupted_records column with schema that has
  non nullable fields.</li>
  </ol>
  
  <p>Thanks!</p>