@Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if ( ! (o instanceof TensorFieldValue other)) return false;

        if ( ! getTensorType().equals(other.getTensorType())) return false;
        if ( ! getTensor().equals(other.getTensor())) return false;
        return true;
    }
Assigns the given tensor to this field value.

The tensor type is also set from the given tensor if it was not set before.
document/src/main/java/com/yahoo/document/datatypes/TensorFieldValue.java