diff options
Diffstat (limited to 'config-model')
-rw-r--r-- | config-model/src/main/java/com/yahoo/schema/processing/PagedAttributeValidator.java | 1 | ||||
-rw-r--r-- | config-model/src/test/java/com/yahoo/schema/processing/PagedAttributeValidatorTestCase.java | 14 |
2 files changed, 10 insertions, 5 deletions
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/PagedAttributeValidator.java b/config-model/src/main/java/com/yahoo/schema/processing/PagedAttributeValidator.java index 34bb6e1db2e..793505acd01 100644 --- a/config-model/src/main/java/com/yahoo/schema/processing/PagedAttributeValidator.java +++ b/config-model/src/main/java/com/yahoo/schema/processing/PagedAttributeValidator.java @@ -48,7 +48,6 @@ public class PagedAttributeValidator extends Processor { private boolean isSupportedType(Attribute attribute) { var type = attribute.getType(); return (type != Attribute.Type.PREDICATE) && - (type != Attribute.Type.REFERENCE) && (isSupportedTensorType(attribute.tensorType())); } diff --git a/config-model/src/test/java/com/yahoo/schema/processing/PagedAttributeValidatorTestCase.java b/config-model/src/test/java/com/yahoo/schema/processing/PagedAttributeValidatorTestCase.java index 2a3a3ff93e9..719db2ffdcc 100644 --- a/config-model/src/test/java/com/yahoo/schema/processing/PagedAttributeValidatorTestCase.java +++ b/config-model/src/test/java/com/yahoo/schema/processing/PagedAttributeValidatorTestCase.java @@ -59,8 +59,14 @@ public class PagedAttributeValidatorTestCase { } private void assertPagedSupported(String fieldType) throws ParseException { - var appBuilder = createFromString(getSd(fieldType)); - var attribute = appBuilder.getSchema().getAttribute("foo"); + assertPagedSupported(fieldType, Optional.empty()); + } + + private void assertPagedSupported(String fieldType, Optional<String> parentSd) throws ParseException { + var appBuilder = parentSd.isPresent() ? + createFromStrings(new BaseDeployLogger(), parentSd.get(), getSd(fieldType)) : + createFromString(getSd(fieldType)); + var attribute = appBuilder.getSchema("test").getAttribute("foo"); assertTrue(attribute.isPaged()); } @@ -75,8 +81,8 @@ public class PagedAttributeValidatorTestCase { } @Test - void reference_attribute_does_not_support_paged_setting() throws ParseException { - assertPagedSettingNotSupported("reference<parent>", Optional.of(getSd("parent", "int"))); + void reference_attribute_support_paged_setting() throws ParseException { + assertPagedSupported("reference<parent>", Optional.of(getSd("parent", "int"))); } private void assertPagedSettingNotSupported(String fieldType) throws ParseException { |