title: How to set an empty struct with all fields null, null in spark
body: <p>I have this dataframe:</p>
  <pre><code>+----+--------------------------------+
  |name|dates                           |
  +----+--------------------------------+
  |A   |[[1994, 12, 11], [,,]]          |
  |B   |[[1994, 12, 11], [1994, 12, 15]]|
  +----+--------------------------------+
  </code></pre>
  <p>with this schema:</p>
  <pre><code>root
   |-- name: string (nullable = true)
   |-- dates: struct (nullable = true)
   |    |-- start_date: struct (nullable = true)
   |    |    |-- year: integer (nullable = true)
   |    |    |-- month: integer (nullable = true)
   |    |    |-- day: integer (nullable = true)
   |    |-- end_date: struct (nullable = true)
   |    |    |-- year: integer (nullable = true)
   |    |    |-- month: integer (nullable = true)
   |    |    |-- day: integer (nullable = true)
  </code></pre>
  <p>I want to have this as output
  when all fields inside <code>end_date</code> are null, set end date as  null</p>
  <pre><code>+----+--------------------------------+
  |name|dates                           |
  +----+--------------------------------+
  |A   |[[1994, 12, 11],]               |
  |B   |[[1994, 12, 11], [1994, 12, 15]]|
  +----+--------------------------------+
  </code></pre>