aboutsummaryrefslogtreecommitdiffstats
path: root/document
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@oath.com>2018-02-01 11:44:31 +0100
committerJon Bratseth <bratseth@oath.com>2018-02-01 11:44:31 +0100
commit99ef288b5023f6879a944eaf2ba325de8997aa50 (patch)
treedc46760052327a41d5a585008aa2a67df670a75b /document
parentc9044baf967cb8aac50ba63519b9f5b9097d9d8e (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.java2
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 */