Details
Description
The following should be `Array([WrappedArray(1, null)])` instead of `Array([WrappedArray(1, 0)])`
import scala.collection.JavaConverters._ import org.apache.spark.sql.Row import org.apache.spark.sql.types.{ArrayType, StructType} val innerStruct = new StructType().add("i", "int", nullable = true) val schema = new StructType().add("arr", ArrayType(innerStruct, containsNull = false)) val df = spark.createDataFrame(List(Row(Seq(Row(1), Row(null)))).asJava, schema) df.select($"arr".getField("i")).collect