diff options
author | Tor Egge <Tor.Egge@yahooinc.com> | 2022-10-10 16:20:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-10 16:20:35 +0200 |
commit | 08f7a121fff008dd1307b106bd1b7d7a84433fe6 (patch) | |
tree | a40bf7e82761a73d442098db93bf0c28f4cd2d8c /config-model/src/main/java/com | |
parent | 25739b46605f7376c2b6e8b9a0ea80939ae04311 (diff) | |
parent | 62a65a21ae3defcfe1352d9536a3571dcedad320 (diff) |
Merge pull request #24378 from vespa-engine/toregge/allow-paged-setting-for-tensor-attributes-without-fast-rank-setting
Allow paged setting for tensor attributes without fast-rank setting.
Diffstat (limited to 'config-model/src/main/java/com')
-rw-r--r-- | config-model/src/main/java/com/yahoo/schema/processing/PagedAttributeValidator.java | 8 |
1 files changed, 4 insertions, 4 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 793505acd01..6f470cfdc56 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 @@ -41,19 +41,19 @@ public class PagedAttributeValidator extends Processor { private void validatePagedSetting(Field field, Attribute attribute) { if (!isSupportedType(attribute)) { - fail(schema, field, "The 'paged' attribute setting is not supported for non-dense tensor, predicate and reference types"); + fail(schema, field, "The 'paged' attribute setting is not supported for fast-rank tensor and predicate types"); } } private boolean isSupportedType(Attribute attribute) { var type = attribute.getType(); return (type != Attribute.Type.PREDICATE) && - (isSupportedTensorType(attribute.tensorType())); + (isSupportedTensorType(attribute.tensorType(), attribute.isFastRank())); } - private boolean isSupportedTensorType(Optional<TensorType> tensorType) { + private boolean isSupportedTensorType(Optional<TensorType> tensorType, boolean fastRank) { if (tensorType.isPresent()) { - return isDenseTensorType(tensorType.get()); + return !fastRank; } return true; } |