title: Why is the avro default value not used ? (with avro-python)
body: <p>I'm serializing some data with Avro (using the python library), and I have a hard time figuring how to make the "default" value work. </p>
  
  <p>I have this schema:</p>
  
  <pre><code>{
      "type": "record",
      "fields":[
          {"name": "amount", "type": "long"},
          {"name": "currency", "type": "string", "default": "EUR"}
      ],
      "name": "Monetary",
  }
  </code></pre>
  
  <p>So as I understood, I could pass an amount and no currency, and the currency field would take the "EUR" value. However, if I don't pass a "currency" field when writing, I get the error <code>avro.io.AvroTypeException: The datum { ... } is not an example of the schema xxx</code>...</p>
  
  <p>If I replace the currency field's type as an union <code>["string", "null"]</code>, then the data is serialized, but currency is null.</p>
  
  <p>So it seems the "default" value is not taken into account at all.</p>
  
  <p>What am I missing ? Are default value applicable for primitive types ?</p>
  
  <p>Thanks in advance</p>