public class ASTServiceNodeOptimizer extends Object implements IASTOptimizer
ServiceNode
s
into a named subquery. Recursively rewrites the WHERE clause of any named
subquery such that there is no more than one ServiceNode
in that
subquery by lifting out additional ServiceNode
s into new named
subqueries.
Note: This rewrite step is useful when it is desirable to run the service
once (it is also possible to annotate the ServiceCall
operator as
PipelineOp.Annotations#PIPELINED
:= false
.
By default, if a ServiceNode
appears in any position other than the
head of a NamedSubqueryRoot
, then it will be invoked once for each
chunk of solutions which flows through that part of the query plan.
BD#SEARCH
. It
may well be that we want to take this out entirely. Our internal
search service runs well when lifted out. However, it might run
just as well if we specified it as an "at-once" operator.Constructor and Description |
---|
ASTServiceNodeOptimizer() |
Modifier and Type | Method and Description |
---|---|
QueryNodeWithBindingSet |
optimize(AST2BOpContext context,
QueryNodeWithBindingSet input)
Optimize the AST.
|
public QueryNodeWithBindingSet optimize(AST2BOpContext context, QueryNodeWithBindingSet input)
IASTOptimizer
optimize
in interface IASTOptimizer
context
- The evaluation context.input
- The input to the optimizer, consisting of a queryNode and
input binding set.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.