public class ASTSetValueExpressionsOptimizer extends Object implements IASTOptimizer
AST2BOpUtility#toVE(String, IValueExpressionNode)
. If a value
expression can be evaluated to a constant, then it is replaced by that
constant.
Note: toVE()
is a NOP for VarNode
s and
ConstantNode
s. In fact, in only acts on the value expression of an
AssignmentNode
and FunctionNode
s.
Note: This has to be done carefully to avoid a side-effect during traversal.
Constructor and Description |
---|
ASTSetValueExpressionsOptimizer() |
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.