code: private Encoder getColumnEncoder(Schema fieldAvroSchema, OutputStream out) {
      // Use a special Avro encoder that has special handling for int, long,
      // and String types. See ColumnEncoder for more information.
      if (fieldAvroSchema.getType() == Type.INT
          || fieldAvroSchema.getType() == Type.LONG
          || fieldAvroSchema.getType() == Type.STRING) {
        return new ColumnEncoder(out);
      } else {
        return EncoderFactory.get().binaryEncoder(out, null);
      }
    }
docs: Returns an Avro Encoder. The implementation it chooses will depend on the
  schema of the field.
  
  @param out
  Output stream to encode bytes to
  @return The avro encoder