public class ASTFlattenUnionsOptimizer extends Object implements IASTOptimizer
UNION(A,B,C) := UNION(A,UNION(B,C)) -or- UNION(UNION(A,B),C))Note: This must run before the
ASTEmptyGroupOptimizer
in order to
eliminate certain UNION/group combinations.
Note: The bigdata SPARQL parser no longer produces this nested UNION construction. However, it is possible that other SPARQL parsers or hand construction can still produce this nesting pattern, in which case this optimizer will flatten out that pattern.
Constructor and Description |
---|
ASTFlattenUnionsOptimizer() |
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.