public static List<String> generateColumnNames(Schema schema) {
    List<Schema.Field> fields = schema.getFields();
    List<String> fieldsList = new ArrayList<String>(fields.size());

    for (Schema.Field field : fields) {
      fieldsList.add(field.name());
    }

    return fieldsList;
  }
An AvroObjectInspectorGenerator takes an Avro schema and creates the three
data structures Hive needs to work with Avro-encoded data:
  * A list of the schema field names
  * A list of those fields equivalent types in Hive
  * An ObjectInspector capable of working with an instance of that datum.
serde/src/java/org/apache/hadoop/hive/serde2/avro/AvroObjectInspectorGenerator.java