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
Fields inherited from class nz.org.riskscape.engine.join.RealizedExpressionJoinIndexer
lhsExpression, operator, rhsExpression
Fields inherited from class nz.org.riskscape.engine.join.JoinIndexer
expressionRealizer, join
-
Constructor Summary
ConstructorDescriptionSpatialIndexer
(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 TypeMethodDescriptionvoid
addToIndex
(nz.org.riskscape.engine.Tuple toCache) nz.org.riskscape.engine.relation.TupleIterator
createRhsIterator
(nz.org.riskscape.engine.Tuple lhs) Create aTupleIterator
that will contain at least the set ofTuple
s that are needed to completely join the lhs to the rhs based on the join.protected boolean
isAllowed
(nz.org.riskscape.engine.rl.RealizedExpression childFilter) Validates thatRealizedExpression
is able to be used for indexing.boolean
isUsable()
toString()
Methods inherited from class nz.org.riskscape.engine.join.RealizedExpressionJoinIndexer
processIndexableMetadata
Methods 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:
isUsable
in 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
DefaultJoiner
can 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:RealizedExpressionJoinIndexer
Validates that
RealizedExpression
is able to be used for indexing.The minimum requirement is the expression must return boolean.
- Overrides:
isAllowed
in 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:JoinIndexer
Create a
TupleIterator
that will contain at least the set ofTuple
s that are needed to completely join the lhs to the rhs based on the join.- Specified by:
createRhsIterator
in classJoinIndexer
-
addToIndex
public void addToIndex(nz.org.riskscape.engine.Tuple toCache) - Specified by:
addToIndex
in classJoinIndexer
-
toString
-