use of com.yahoo.search.predicate.optimization.PredicateOptions in project vespa by vespa-engine.
the class OptimizePredicateExpression method doExecute.
@Override
protected void doExecute(ExecutionContext ctx) {
PredicateFieldValue predicate = ((PredicateFieldValue) ctx.getValue()).clone();
IntegerFieldValue arity = (IntegerFieldValue) ctx.getVariable("arity");
LongFieldValue lower_bound = (LongFieldValue) ctx.getVariable("lower_bound");
LongFieldValue upper_bound = (LongFieldValue) ctx.getVariable("upper_bound");
Long lower = lower_bound != null ? lower_bound.getLong() : null;
Long upper = upper_bound != null ? upper_bound.getLong() : null;
PredicateOptions options = new PredicateOptions(arity.getInteger(), lower, upper);
predicate.setPredicate(optimizer.process(predicate.getPredicate(), options));
ctx.setValue(predicate);
}
Aggregations