summaryrefslogtreecommitdiffstats
path: root/config-model/src/main/java/com/yahoo/searchdefinition/processing/TypedTransformProvider.java
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@oath.com>2018-02-26 16:41:25 +0100
committerJon Bratseth <bratseth@oath.com>2018-02-26 16:41:25 +0100
commit174745d431c59bfd7d8077b817dc38090010fd35 (patch)
tree135c22a0f22cbdbdcf0b48bf8b9ea2c4c80d7eca /config-model/src/main/java/com/yahoo/searchdefinition/processing/TypedTransformProvider.java
parent446dc287bf35768b73e1390df07a9462ae9db800 (diff)
Don't validate when reloading models
Diffstat (limited to 'config-model/src/main/java/com/yahoo/searchdefinition/processing/TypedTransformProvider.java')
-rw-r--r--config-model/src/main/java/com/yahoo/searchdefinition/processing/TypedTransformProvider.java21
1 files changed, 11 insertions, 10 deletions
diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/processing/TypedTransformProvider.java b/config-model/src/main/java/com/yahoo/searchdefinition/processing/TypedTransformProvider.java
index 8ad985f07b9..b329cc3bea3 100644
--- a/config-model/src/main/java/com/yahoo/searchdefinition/processing/TypedTransformProvider.java
+++ b/config-model/src/main/java/com/yahoo/searchdefinition/processing/TypedTransformProvider.java
@@ -9,7 +9,7 @@ import com.yahoo.vespa.indexinglanguage.ValueTransformProvider;
import com.yahoo.vespa.indexinglanguage.expressions.*;
/**
- * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a>
+ * @author Simon Thoresen
*/
public abstract class TypedTransformProvider extends ValueTransformProvider {
@@ -27,23 +27,23 @@ public abstract class TypedTransformProvider extends ValueTransformProvider {
String fieldName = ((OutputExpression)exp).getFieldName();
if (exp instanceof AttributeExpression) {
Attribute attribute = search.getAttribute(fieldName);
- if (attribute == null) {
+ if (attribute == null)
throw new IllegalArgumentException("Attribute '" + fieldName + "' not found.");
- }
fieldType = attribute.getDataType();
- } else if (exp instanceof IndexExpression) {
+ }
+ else if (exp instanceof IndexExpression) {
Field field = search.getConcreteField(fieldName);
- if (field == null) {
+ if (field == null)
throw new IllegalArgumentException("Index field '" + fieldName + "' not found.");
- }
fieldType = field.getDataType();
- } else if (exp instanceof SummaryExpression) {
+ }
+ else if (exp instanceof SummaryExpression) {
Field field = search.getSummaryField(fieldName);
- if (field == null) {
+ if (field == null)
throw new IllegalArgumentException("Summary field '" + fieldName + "' not found.");
- }
fieldType = field.getDataType();
- } else {
+ }
+ else {
throw new UnsupportedOperationException();
}
}
@@ -58,4 +58,5 @@ public abstract class TypedTransformProvider extends ValueTransformProvider {
protected abstract boolean requiresTransform(Expression exp, DataType fieldType);
protected abstract Expression newTransform(DataType fieldType);
+
}