code: public Schema getSchema() {
      if (this.partition.isPresent()) {
        String schemaString = this.partition.get().get(SchemaBasedWriterPartitioner.SCHEMA_STRING).toString();
        this.withSchema(new Schema.Parser().parse(schemaString));
        return this.schema;
      } else {
        return null;
      }
    }
docs: Get schema from {@link #partition} since the correct schema is not known at creation