public class BigdataExprBuilder extends GroupGraphPatternBuilder
graphPattern
context
Constructor and Description |
---|
BigdataExprBuilder(BigdataASTContext context) |
Modifier and Type | Method and Description |
---|---|
protected void |
handleSelect(ASTSelect select,
IProjectionDecl queryRoot)
Handle a SELECT clause.
|
static void |
verifyAggregate(QueryBase queryBase)
Verify the various conditions that must be met when a query uses GROUP BY
or when a query uses aggregates in a PROJECTION.
|
QueryBase |
visit(ASTAskQuery node,
Object data)
ASK query.
|
BindingsClause |
visit(ASTBindingsClause node,
Object data) |
IBindingSet |
visit(ASTBindingSet node,
Object data)
Note:
BigdataValue s have already been resolved to IV s. |
ValueExpressionNode |
visit(ASTBindingValue node,
Object data) |
QueryBase |
visit(ASTConstructQuery node,
Object data)
Handle a CONSTRUCT query.
|
Void |
visit(ASTDescribe node,
Object data)
This is the "projection" part of the DESCRIBE query.
|
QueryBase |
visit(ASTDescribeQuery node,
Object data)
DESCRIBE query.
|
GroupByNode |
visit(ASTGroupClause node,
Object data) |
Long |
visit(ASTLimit node,
Object data) |
Long |
visit(ASTOffset node,
Object data) |
List<OrderByExpr> |
visit(ASTOrderClause node,
Object data) |
OrderByExpr |
visit(ASTOrderCondition node,
Object data)
Note: Delegate to the
ValueExprBuilder . |
QueryRoot |
visit(ASTQueryContainer node,
Object data)
This is the top-level entry point for a SPARQL query.
|
QueryBase |
visit(ASTSelectQuery astQuery,
Object data)
This is the entry point for both a top-level SELECT and a SubSelect.
|
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
aggregate, binary, left, nary, noneary, quadary, right, ternary, unary, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
depth, firstASTGraphGraphAncestor, indent, indent, scopedGroupGraphPattern, visit, visit, visit, visit, visit, visit, visit, visit, visit
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
public BigdataExprBuilder(BigdataASTContext context)
public QueryRoot visit(ASTQueryContainer node, Object data) throws VisitorException
Note: ASTBaseDecl
and ASTPrefixDecl
s are available from
the ASTQueryContainer
node. They are being ignored here as they
should have been processed before running the BigdataExprBuilder
.
Note: ASTQuery
is an abstract type. The concrete classes are:
ASTAskQuery
, ASTConstructQuery
, ASTDescribeQuery
,
and ASTSelectQuery
. This method will wind up delegating to the
visitor method for the appropriate concrete ASTQuery
instance.
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public QueryBase visit(ASTSelectQuery astQuery, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
QueryRoot
or a
SubqueryRoot
depending on whether or not the
ASTSelectQuery
appears as a top-level query or a
subquery.VisitorException
public QueryBase visit(ASTAskQuery node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public QueryBase visit(ASTDescribeQuery node, Object data) throws VisitorException
Note: The openrdf parser has a "Describe" production which is not in the
SPARQL 1.1 grammar (it is an equivalent grammar in that it accepts the
same inputs). This means that the "projection" part of the DESCRIBE query
is visited on the ASTDescribe
node.
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public Void visit(ASTDescribe node, Object data) throws VisitorException
ProjectionNode
to the QueryBase
. The ProjectionNode
uses an assignment
node to bind an anonymous variable for a IRI. Variables are projected
normally. *
is projected as the variable named "*".
Note: This ProjectionNode
models the "DESCRIBE" but does not
provide a query plan. The QueryBase
MUST be further rewritten in
order to supply an appropriate query plan. This should be done using the
appropriate IASTOptimizer
.
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
data
- The QueryBase
.VisitorException
public QueryBase visit(ASTConstructQuery node, Object data) throws VisitorException
This builds a ConstructNode
which is a model of the statement
patterns in the construct template and attaches the where clause and
solution modifiers. However, this is NOT a complete description of the
semantics of the query. An IASTOptimizer
will intercept the
CONSTRUCT query and rewrite it before it is executed in order to provide
an appropriate ProjectionNode
.
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final GroupByNode visit(ASTGroupClause node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final List<OrderByExpr> visit(ASTOrderClause node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final OrderByExpr visit(ASTOrderCondition node, Object data) throws VisitorException
ValueExprBuilder
.visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final Long visit(ASTLimit node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final Long visit(ASTOffset node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
protected void handleSelect(ASTSelect select, IProjectionDecl queryRoot) throws VisitorException
ProjectionNode
will be attached to
the IProjectionDecl
.select
- The ASTSelect
node.queryRoot
- The QueryBase
.VisitorException
public final BindingsClause visit(ASTBindingsClause node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
BigdataValue
s. They must be translated into
IV
through a batch resolution process before they can be
passed into the query engine.VisitorException
public IBindingSet visit(ASTBindingSet node, Object data) throws VisitorException
BigdataValue
s have already been resolved to IV
s.visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
data
- The ordered variables for which bindings must be given.VisitorException
public ValueExpressionNode visit(ASTBindingValue node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public static void verifyAggregate(QueryBase queryBase) throws VisitorException
queryBase
- The query.VisitorException
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.