Package nz.org.riskscape.engine.join
Interface LopsidedJoiner<T>
- All Superinterfaces:
AutoCloseable
,Realized
A variation on Joiner that works by joining individual values from the lhs (left-hand side) to an indexed
set of rhs (right-hand side) values. This API expects that the work of building the index be done for it in advance
of being passed to join(Object, Tuple)
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addToRhsIndex
(Tuple rhs, T index) Accumulate a rhs value in to the indexThe type of tuple thatjoin(Object, Tuple)
produces.getLhs()
Expected type of the lhs of this joingetRhs()
Expected type of the rhs of this joindefault boolean
Join a single lhs value to the indexed set of rhs values.
-
Field Details
-
LHS_STEP_INDEX
static final int LHS_STEP_INDEX- See Also:
-
RHS_STEP_INDEX
static final int RHS_STEP_INDEX- See Also:
-
-
Method Details
-
getLhs
Struct getLhs()Expected type of the lhs of this join
-
getRhs
Struct getRhs()Expected type of the rhs of this join
-
getJoinedType
Struct getJoinedType()The type of tuple that
join(Object, Tuple)
produces. -
createRhsIndex
T createRhsIndex()- Returns:
- a new, empty index, for use with
addToRhsIndex(Tuple, Object)
-
addToRhsIndex
Accumulate a rhs value in to the index
-
join
Join a single lhs value to the indexed set of rhs values. Implementations should use
TupleIterator.EMPTY
andSingleton
where possible to take advantage of various optimisations in pipeline execution. -
hasChildPipeline
default boolean hasChildPipeline()- Returns:
- true if this join requires a child pipeline, i.e. it is computationally very expensive
-