Package ca.uqac.lif.cep.tuples
Class MergeTuples
java.lang.Object
ca.uqac.lif.cep.functions.Function
ca.uqac.lif.cep.tuples.MergeTuples
- All Implemented Interfaces:
ca.uqac.lif.cep.Duplicable,ca.uqac.lif.cep.functions.DuplicableFunction
public class MergeTuples
extends ca.uqac.lif.cep.functions.Function
Merges the key-value pairs of multiple tuples into a single tuple.
If two tuples have the same key, the value in the resulting tuple
is that of one of these tuples; which one is left undefined.
However, if the tuples have the same value for their common keys,
the resuting tuple is equivalent to that of a relational JOIN
operation.
- Author:
- Sylvain Hallé
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected FixedTupleBuilderA helper class to build instances of the merged tuplesprotected intThe number of input tuples to mergeFields inherited from class ca.uqac.lif.cep.functions.Function
s_maxInputArity -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionduplicate(boolean with_state) voidvoidintvoidgetInputTypesFor(Set<Class<?>> classes, int index) intClass<?> getOutputTypeFor(int index) voidreset()Methods inherited from class ca.uqac.lif.cep.functions.Function
duplicate, evaluate, evaluateLazy, evaluatePartial, printState, readState
-
Field Details
-
m_inputArity
protected int m_inputArityThe number of input tuples to merge -
m_builder
A helper class to build instances of the merged tuples
-
-
Constructor Details
-
MergeTuples
public MergeTuples() -
MergeTuples
public MergeTuples(int arity)
-
-
Method Details
-
evaluate
- Specified by:
evaluatein classca.uqac.lif.cep.functions.Function
-
evaluate
- Overrides:
evaluatein classca.uqac.lif.cep.functions.Function
-
getInputArity
public int getInputArity()- Specified by:
getInputArityin classca.uqac.lif.cep.functions.Function
-
getOutputArity
public int getOutputArity()- Specified by:
getOutputArityin classca.uqac.lif.cep.functions.Function
-
reset
public void reset()- Overrides:
resetin classca.uqac.lif.cep.functions.Function
-
duplicate
- Specified by:
duplicatein interfaceca.uqac.lif.cep.Duplicable- Specified by:
duplicatein classca.uqac.lif.cep.functions.Function
-
getInputTypesFor
- Specified by:
getInputTypesForin classca.uqac.lif.cep.functions.Function
-
getOutputTypeFor
- Specified by:
getOutputTypeForin classca.uqac.lif.cep.functions.Function
-