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 VarNodes and
ConstantNodes. In fact, in only acts on the value expression of an
AssignmentNode and FunctionNodes.
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)
IASTOptimizeroptimize in interface IASTOptimizercontext - 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.