private void validateField(BoundField field) {
        Objects.requireNonNull(field, "`field` must be non-null");
        if (this.schema != field.schema)
            throw new SchemaException("Attempt to access field '" + field.def.name + "' from a different schema instance.");
        if (field.index > values.length)
            throw new SchemaException("Invalid field index: " + field.index);
    }
Ensure the user doesn't try to access fields from the wrong schema

@throws SchemaException If validation fails
clients/src/main/java/org/apache/kafka/common/protocol/types/Struct.java