diff options
author | Jon Bratseth <bratseth@oath.com> | 2018-02-01 11:44:31 +0100 |
---|---|---|
committer | Jon Bratseth <bratseth@oath.com> | 2018-02-01 11:44:31 +0100 |
commit | 99ef288b5023f6879a944eaf2ba325de8997aa50 (patch) | |
tree | dc46760052327a41d5a585008aa2a67df670a75b /document | |
parent | c9044baf967cb8aac50ba63519b9f5b9097d9d8e (diff) |
Allow compatible changes to stored tensors
Allow increasing the size of tensor dimensions without making stored
data incompatible.
Diffstat (limited to 'document')
-rw-r--r-- | document/src/main/java/com/yahoo/document/TensorDataType.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/document/src/main/java/com/yahoo/document/TensorDataType.java b/document/src/main/java/com/yahoo/document/TensorDataType.java index 50e9cf0f60f..b21461597bf 100644 --- a/document/src/main/java/com/yahoo/document/TensorDataType.java +++ b/document/src/main/java/com/yahoo/document/TensorDataType.java @@ -42,7 +42,7 @@ public class TensorDataType extends DataType { if (value == null) return false; if ( ! TensorFieldValue.class.isAssignableFrom(value.getClass())) return false; TensorFieldValue tensorValue = (TensorFieldValue)value; - return tensorType.isAssignableTo(tensorValue.getDataType().getTensorType()); + return tensorType.isConvertibleTo(tensorValue.getDataType().getTensorType()); } /** Returns the type of the tensor this field can hold */ |