title: Allow null values in fields of hive table
body: <p>I am creating a hive table from a avro file stored in hdfs. And, this avro file has been generated from a mongodb collection. The thing is some of the fields have null values and I want my fields in the hive table to accept null values as well apart from what they are supposed to store (like int, string, array, etc.). I created the hive table using</p>
  
  <pre><code>CREATE EXTERNAL TABLE pub_avro
  ROW FORMAT SERDE
  'org.apache.hadoop.hive.serde2.avro.AvroSerDe'
  STORED AS INPUTFORMAT
  'org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat'
  OUTPUTFORMAT
  'org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat'
  location "hdfs://path/to/avro_source_file"
  TBLPROPERTIES (
  'avro.schema.url'='hdfs://path/to/avro_schema.avsc');
  </code></pre>
  
  <p>This creates the table:</p>
  
  <pre><code>OK
  Time taken: 0.32 seconds
  </code></pre>
  
  <p>But when I'm printing the fields, it gives me:</p>
  
  <pre><code>hive&gt; select * from pub_avro limit 10;
  OK
  Failed with exception java.io.IOException:org.apache.avro.AvroTypeException: Found null, expecting array
  Time taken: 0.532 seconds
  </code></pre>