Package nz.org.riskscape.engine.join
Class SpatialIndexer
java.lang.Object
nz.org.riskscape.engine.join.JoinIndexer
nz.org.riskscape.engine.join.RealizedExpressionJoinIndexer
nz.org.riskscape.engine.join.SpatialIndexer
JoinIndexer implementation that attempts to build an in-memory spatial index of the tuples
for narrowing down the set of rhs tuples.
-
Nested Class Summary
Nested classes/interfaces inherited from class nz.org.riskscape.engine.join.JoinIndexer
JoinIndexer.Constructor -
Field Summary
FieldsFields inherited from class nz.org.riskscape.engine.join.RealizedExpressionJoinIndexer
lhsExpression, operator, rhsExpressionFields inherited from class nz.org.riskscape.engine.join.JoinIndexer
expressionRealizer, join -
Constructor Summary
ConstructorsConstructorDescriptionSpatialIndexer(nz.org.riskscape.engine.join.Join join, nz.org.riskscape.engine.relation.TupleIterator rhs, nz.org.riskscape.engine.rl.ExpressionRealizer expressionRealizer) SpatialIndexer(nz.org.riskscape.engine.join.Join join, nz.org.riskscape.engine.rl.ExpressionRealizer expressionRealizer) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToIndex(nz.org.riskscape.engine.Tuple toCache) nz.org.riskscape.engine.relation.TupleIteratorcreateRhsIterator(nz.org.riskscape.engine.Tuple lhs) Create aTupleIteratorthat will contain at least the set ofTuples that are needed to completely join the lhs to the rhs based on the join.protected booleanisAllowed(nz.org.riskscape.engine.rl.RealizedExpression childFilter) Validates thatRealizedExpressionis able to be used for indexing.booleanisUsable()toString()Methods inherited from class nz.org.riskscape.engine.join.RealizedExpressionJoinIndexer
processIndexableMetadataMethods inherited from class nz.org.riskscape.engine.join.JoinIndexer
getExpressionRealizer, getJoin
-
Field Details
-
CONSTRUCTOR
-
ALLOWED_GEO_FUNCTIONS
-
-
Constructor Details
-
SpatialIndexer
public SpatialIndexer(nz.org.riskscape.engine.join.Join join, nz.org.riskscape.engine.relation.TupleIterator rhs, nz.org.riskscape.engine.rl.ExpressionRealizer expressionRealizer) -
SpatialIndexer
public SpatialIndexer(nz.org.riskscape.engine.join.Join join, nz.org.riskscape.engine.rl.ExpressionRealizer expressionRealizer)
-
-
Method Details
-
isUsable
public boolean isUsable()- Overrides:
isUsablein classRealizedExpressionJoinIndexer- Returns:
- true if this join can be used, e.g. it's suitable for the query and join. This is intended as a simpler
way of providing a set of implementations such that the
DefaultJoinercan work through which ones are appropriate by checking this method.
-
isAllowed
protected boolean isAllowed(nz.org.riskscape.engine.rl.RealizedExpression childFilter) Description copied from class:RealizedExpressionJoinIndexerValidates that
RealizedExpressionis able to be used for indexing.The minimum requirement is the expression must return boolean.
- Overrides:
isAllowedin classRealizedExpressionJoinIndexer- Parameters:
childFilter- to check- Returns:
- true if expression can be applied to this indexer
-
createRhsIterator
public nz.org.riskscape.engine.relation.TupleIterator createRhsIterator(nz.org.riskscape.engine.Tuple lhs) Description copied from class:JoinIndexerCreate a
TupleIteratorthat will contain at least the set ofTuples that are needed to completely join the lhs to the rhs based on the join.- Specified by:
createRhsIteratorin classJoinIndexer
-
addToIndex
public void addToIndex(nz.org.riskscape.engine.Tuple toCache) - Specified by:
addToIndexin classJoinIndexer
-
toString
-