title: how to make avro union multiple types only show ONE type (the one not null)
body: <p>I have the following avro schema</p>
  <pre class="lang-json prettyprint-override"><code>{
    &quot;type&quot; : &quot;record&quot;,
    &quot;namespace&quot; : &quot;com.test.avro&quot;,
    &quot;name&quot; : &quot;MultiTypeObject&quot;,
    &quot;fields&quot; : [
      {
        &quot;name&quot; : &quot;id&quot;,
        &quot;type&quot; : &quot;int&quot;
      },
      {
        &quot;name&quot; : &quot;value&quot;,
        &quot;type&quot; : [&quot;null&quot;, &quot;double&quot;, &quot;int&quot;, &quot;boolean&quot;],
        &quot;default&quot; : null
      }
    ]
  }
  </code></pre>
  <p>However, when I write the data into S3 using AvroParquet and query in Json format, I got this</p>
  <pre class="lang-json prettyprint-override"><code>&quot;myObject&quot;: {
    &quot;id&quot;: 1,
    &quot;value&quot;: {
      &quot;member2&quot;: null,
      &quot;member0&quot;: 24.439999999999998,
      &quot;member1&quot;: null
    }
  }
  </code></pre>
  <p>Question is how can I make this value field just have one value being printed out as below?</p>
  <pre class="lang-json prettyprint-override"><code>&quot;myObject&quot;: {
    &quot;id&quot;: 1,
    &quot;value&quot;: 24.439999999999998
  }
  </code></pre>
  <p>Many thanks.</p>