|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.rdf.sparql.ast.eval.AST2BOpContext
public class AST2BOpContext
Convenience class for passing around the various pieces of context necessary to construct the bop pipeline.
| Field Summary | |
|---|---|
int |
accessPathSampleLimit
The #of samples to take when comparing the cost of a SCAN with an IN filter to as-bound evaluation for each graph in the data set. |
boolean |
accessPathScanAndFilter
For named and default graph access paths where access path cost estimation is disabled by setting the accessPathSampleLimit to
ZERO (0), this determines whether a SCAN + FILTER or PARALLEL SUBQUERY
(aka as-bound data set join) approach. |
ASTContainer |
astContainer
The ASTContainer |
protected AbstractTripleStore |
db
The KB instance. |
boolean |
mergeJoin
When true, a merge-join pattern will be recognized if it
appears in a join group. |
boolean |
nativeDistinctSolutions
When true, will use the version of the DISTINCT SOLUTIONS
operator which uses the HTree against the native heap. |
boolean |
nativeDistinctSPO
When true, may use the version of DISTINCT which operates on
the native heap (this is only used when we are doing a hash join against
a default graph access path and the predicate for that access path has a
large cardinality). |
long |
nativeDistinctSPOThreshold
The threshold at which we will use a native hash set rather than a default hash set for a default graph access path. |
boolean |
nativeHashJoins
When true, use hash index operations based on the
HTree. |
ASTOptimizerList |
optimizers
The query optimizers (this includes both query rewrites for correct semantics, such as a rewrite of a DESCRIBE query into a CONSTRUCT query, and query rewrites for performance optimizations). |
QueryEngine |
queryEngine
The QueryEngine. |
Properties |
queryHints
The query hints from the original #query. |
UUID |
queryId
The unique identifier assigned to this query. |
boolean |
remoteAPs
When true, force the use of REMOTE access paths in scale-out
joins. |
ISparqlCache |
sparqlCache
The SparqlCache. |
| Constructor Summary | |
|---|---|
AST2BOpContext(ASTContainer astContainer,
AbstractTripleStore db)
|
|
| Method Summary | |
|---|---|
String |
createVar(String prefix)
Create a new variable name which is unique within the scope of this AST2BOpContext. |
AbstractTripleStore |
getAbstractTripleStore()
Return the database. |
String |
getLexiconNamespace()
Return the namespace of the LexiconRelation. |
long |
getLexiconReadTimestamp()
Return the timestamp which will be used to read on the lexicon. |
String |
getNamespace()
Return the namespace of the AbstractTripleStore. |
ISolutionSetStats |
getSolutionSetStats()
Some summary statistics about the exogenous solution sets. |
ISparqlCache |
getSparqlCache()
Return the cache for named solution sets (experimental feature). |
String |
getSPONamespace()
Return the namespace of the SPORelation. |
long |
getTimestamp()
The timestamp or transaction identifier associated with the view. |
boolean |
isCluster()
Return true if we are running on a cluster. |
boolean |
isQuads()
Return true iff the target AbstractTripleStore is in
quads mode. |
boolean |
isSIDs()
Return true iff the target AbstractTripleStore is in
SIDS mode. |
boolean |
isTriples()
Return true iff the target AbstractTripleStore is in
triples mode. |
int |
nextId()
|
void |
setSolutionSetStats(ISolutionSetStats stats)
Set the statistics summary for the exogenous solution sets. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final ASTContainer astContainer
ASTContainer
protected final AbstractTripleStore db
public final QueryEngine queryEngine
QueryEngine.
public final ISparqlCache sparqlCache
SparqlCache.
public final Properties queryHints
#query.
QueryHints,
ASTQueryHintOptimizerpublic final UUID queryId
QueryHints.QUERYID,
QueryEngine.Annotations#QUERY_IDpublic final ASTOptimizerList optimizers
public boolean nativeDistinctSPO
true, may use the version of DISTINCT which operates on
the native heap (this is only used when we are doing a hash join against
a default graph access path and the predicate for that access path has a
large cardinality).
public long nativeDistinctSPOThreshold
public boolean nativeDistinctSolutions
true, will use the version of the DISTINCT SOLUTIONS
operator which uses the HTree against the native heap.
QueryHints.NATIVE_DISTINCT_SOLUTIONSpublic boolean nativeHashJoins
true, use hash index operations based on the
HTree. Otherwise use hash index operations based on the Java
collection classes. The HTree is more scalable but has higher
overhead for small cardinality hash joins.
QueryHints.NATIVE_HASH_JOINSpublic boolean mergeJoin
true, a merge-join pattern will be recognized if it
appears in a join group. When false, this can still be
selectively enabled using a query hint.
public boolean remoteAPs
true, force the use of REMOTE access paths in scale-out
joins.
public int accessPathSampleLimit
When ZERO (0), no cost estimation will be performed and the named graph or default graph join will always use the SCAN + FILTER approach.
public boolean accessPathScanAndFilter
accessPathSampleLimit to
ZERO (0), this determines whether a SCAN + FILTER or PARALLEL SUBQUERY
(aka as-bound data set join) approach.
| Constructor Detail |
|---|
public AST2BOpContext(ASTContainer astContainer,
AbstractTripleStore db)
queryRoot - The root of the query.db - The KB instance.
TODO We should be passing in the IIndexManager rather
than the AbstractTripleStore in order to support cross
kb queries. The AST can be annotated with the namespace of the
default KB instance, which can then be resolved from the
IIndexManager. This would also allow us to clear up
the [lex] namespace parameter to the FunctionNode and
FunctionRegistry.| Method Detail |
|---|
public ISolutionSetStats getSolutionSetStats()
IEvaluationContextAST2BOpUtility.convert(AST2BOpContext, IBindingSet[])
before it begins to run the IASTOptimizers.
getSolutionSetStats in interface IEvaluationContextpublic void setSolutionSetStats(ISolutionSetStats stats)
stats - The summary statistics.
IllegalArgumentException - if the argument is null
IllegalStateException - if the property has already been set.public long getTimestamp()
IEvaluationContext
getTimestamp in interface IEvaluationContextpublic int nextId()
nextId in interface IdFactorypublic boolean isCluster()
IEvaluationContexttrue if we are running on a cluster.
isCluster in interface IEvaluationContextpublic boolean isQuads()
IEvaluationContexttrue iff the target AbstractTripleStore is in
quads mode.
isQuads in interface IEvaluationContextpublic boolean isSIDs()
IEvaluationContexttrue iff the target AbstractTripleStore is in
SIDS mode.
isSIDs in interface IEvaluationContextpublic boolean isTriples()
IEvaluationContexttrue iff the target AbstractTripleStore is in
triples mode.
isTriples in interface IEvaluationContextpublic String getNamespace()
IEvaluationContextAbstractTripleStore.
getNamespace in interface IEvaluationContextpublic String getSPONamespace()
IEvaluationContextSPORelation.
getSPONamespace in interface IEvaluationContextpublic String getLexiconNamespace()
IEvaluationContextLexiconRelation.
getLexiconNamespace in interface IEvaluationContextpublic final String createVar(String prefix)
AST2BOpContext.
prefix - The prefix. The general pattern for a prefix is "-foo-".
public long getLexiconReadTimestamp()
IEvaluationContextNote: This uses the timestamp of the triple store view unless this is a read/write transaction, in which case we need to use the last commit point in order to see any writes which it may have performed (lexicon writes are always unisolated).
getLexiconReadTimestamp in interface IEvaluationContextpublic AbstractTripleStore getAbstractTripleStore()
IEvaluationContext
getAbstractTripleStore in interface IEvaluationContextpublic ISparqlCache getSparqlCache()
IEvaluationContext
getSparqlCache in interface IEvaluationContextnull.QueryHints.SOLUTION_SET_CACHE
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||