title: Spark 3.3.0 not honoring my schema nullability in Java
body: <p>I'm using Spark 3.3.0 with Java 11. I'm reading a single-column CSV file of IDs. I want to manually set the schema. What could be simpler? I use:</p>
  <pre><code>StructType schema = DataTypes.createStructType(List.of(
      DataTypes.createStructField(&quot;id&quot;, DataTypes.StringType, false)))
  </code></pre>
  <p>Notice that I indicate <code>false</code> for the nullability.</p>
  <p>I read the file:</p>
  <pre><code>Dataset&lt;Row&gt; df = spark.read().format(&quot;csv&quot;).option(&quot;header&quot;, &quot;false&quot;)
      .schema(schema).load(&quot;path/to/file.csv&quot;)
  df.printSchema();
  </code></pre>
  <p>Here's the schema it prints:</p>
  <pre><code>root
   |-- id: string (nullable = true)
  </code></pre>
  <p>What? Didn't I just tell Spark that the <code>id</code> columns should <em>not</em> be nullable? What did I do wrong to screw up this most basic of operations?</p>