aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/test/java/com/yahoo/schema/processing
diff options
context:
space:
mode:
authorGeir Storli <geirst@yahooinc.com>2022-05-19 13:14:52 +0000
committerGeir Storli <geirst@yahooinc.com>2022-05-19 13:14:52 +0000
commit06f290f5477996d86cbc4a5d98da68e5cf0cb367 (patch)
tree92dc39f69290b50109676e2ae11f7c7636995fda /config-model/src/test/java/com/yahoo/schema/processing
parent340f78ced167cc2bbf02c7541664b0c305b6a1e9 (diff)
Changing 'fast-rank' on an attribute should trigger the restart action.
Add more testing of 'fast-rank' on un-supported attributes.
Diffstat (limited to 'config-model/src/test/java/com/yahoo/schema/processing')
-rw-r--r--config-model/src/test/java/com/yahoo/schema/processing/TensorFieldTestCase.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/config-model/src/test/java/com/yahoo/schema/processing/TensorFieldTestCase.java b/config-model/src/test/java/com/yahoo/schema/processing/TensorFieldTestCase.java
index 67c77508e3b..9164f361a92 100644
--- a/config-model/src/test/java/com/yahoo/schema/processing/TensorFieldTestCase.java
+++ b/config-model/src/test/java/com/yahoo/schema/processing/TensorFieldTestCase.java
@@ -55,6 +55,17 @@ public class TensorFieldTestCase {
}
@Test
+ public void requireThatIndexedTensorAttributeCannotBeFastRank() throws ParseException {
+ try {
+ createFromString(getSd("field f1 type tensor(x[3]) { indexing: attribute \n attribute: fast-rank }"));
+ fail("Expected exception");
+ }
+ catch (IllegalArgumentException e) {
+ assertEquals("The attribute 'f1' (tensor(x[3])) does not support 'fast-rank'. Only supported for tensor types with at least one mapped dimension", e.getMessage());
+ }
+ }
+
+ @Test
public void requireThatIllegalTensorTypeSpecThrowsException() throws ParseException {
try {
createFromString(getSd("field f1 type tensor(invalid) { indexing: attribute }"));