private ZoneId extractWriterTimezoneFromMetadata(JobConf job, FileSplit split,
      GenericDatumReader<GenericRecord> gdr) {
    if (job == null || gdr == null || split == null || split.getPath() == null) {
      return null;
    }
    try (DataFileReader<GenericRecord> dataFileReader = new DataFileReader<GenericRecord>(
        new FsInput(split.getPath(), job), gdr)) {
      if (dataFileReader.getMeta(AvroSerDe.WRITER_TIME_ZONE) != null) {
        try {
          return ZoneId.of(new String(dataFileReader.getMeta(AvroSerDe.WRITER_TIME_ZONE),
              StandardCharsets.UTF_8));
        } catch (DateTimeException e) {
          throw new RuntimeException("Can't parse writer time zone stored in file metadata", e);
        }
      }
    } catch (IOException e) {
      // Can't access metadata, carry on.
      LOG.debug(e.getMessage(), e);
    }
    return null;
  }
Attempt to retrieve the reader schema.  We have a couple opportunities
to provide this, depending on whether or not we're just selecting data
or running with a MR job.
@return  Reader schema for the Avro object, or null if it has not been provided.
@throws AvroSerdeException
ql/src/java/org/apache/hadoop/hive/ql/io/avro/AvroGenericRecordReader.java