code: public Schema flatten(Schema schema, boolean flattenComplexTypes) {
      Preconditions.checkNotNull(schema);
  
      // To help make it configurable later
      this.flattenedNameJoiner = FLATTENED_NAME_JOINER;
      this.flattenedSourceJoiner = FLATTENED_SOURCE_JOINER;
  
      Schema flattenedSchema = flatten(schema, false, flattenComplexTypes);
  
      LOG.debug("Original Schema : " + schema);
      LOG.debug("Flattened Schema: " + flattenedSchema);
  
      return flattenedSchema;
    }
docs: *
  Flatten the Schema to un-nest recursive Records (to make it optimal for ORC)
  @param schema Avro Schema to flatten
  @param flattenComplexTypes Flatten complex types recursively other than Record and Option
  @return Flattened Avro Schema