use of com.yahoo.document.DataType in project vespa by vespa-engine.
the class IfThenExpression method doVerify.
@Override
protected void doVerify(VerificationContext context) {
DataType input = context.getValue();
context.setValue(input).execute(lhs);
context.setValue(input).execute(rhs);
context.setValue(input).execute(ifTrue);
context.setValue(input).execute(ifFalse);
context.setValue(input);
}
use of com.yahoo.document.DataType in project vespa by vespa-engine.
the class IfThenExpression method requiredInputType.
@Override
public DataType requiredInputType() {
DataType input = null;
input = resolveRequiredInputType(input, lhs.requiredInputType());
input = resolveRequiredInputType(input, rhs.requiredInputType());
input = resolveRequiredInputType(input, ifTrue.requiredInputType());
if (ifFalse != null) {
input = resolveRequiredInputType(input, ifFalse.requiredInputType());
}
return input;
}
use of com.yahoo.document.DataType in project vespa by vespa-engine.
the class JoinExpression method doVerify.
@Override
protected void doVerify(VerificationContext context) {
DataType input = context.getValue();
if (!(input instanceof ArrayDataType)) {
throw new VerificationException(this, "Expected Array input, got " + input.getName() + ".");
}
context.setValue(createdOutputType());
}
use of com.yahoo.document.DataType in project vespa by vespa-engine.
the class ScriptExpression method doVerify.
@Override
protected void doVerify(VerificationContext context) {
DataType input = context.getValue();
for (Expression exp : this) {
context.setValue(input).execute(exp);
}
context.setValue(input);
}
use of com.yahoo.document.DataType in project vespa by vespa-engine.
the class SetVarExpression method doVerify.
@Override
protected void doVerify(VerificationContext context) {
DataType next = context.getValue();
DataType prev = context.getVariable(varName);
if (prev != null && !prev.equals(next)) {
throw new VerificationException(this, "Attempting to assign conflicting types to variable '" + varName + "', " + prev.getName() + " vs " + next.getName() + ".");
}
context.setVariable(varName, next);
}
Aggregations