public final class UNION_RELATION_RELATION extends java.lang.Object implements AggregationOperatorImplementation
UNIONUSING_RELATION_RELATION
, where the third argument mentions all the interval-typed attributes of the RELATION arguments' headings, in lexicographical order.Constructor and Description |
---|
UNION_RELATION_RELATION(Heading heading)
Creates the UNION_RELATION_RELATION
|
Modifier and Type | Method and Description |
---|---|
static java.util.Set<TupleBuffer> |
computePlainUnion(java.util.Collection<TupleBuffer> r1,
java.util.Collection<TupleBuffer> r2)
The most stupid way conceivable to compute a relation union of relations that have no interval-typed attributes
|
ValueBuffer |
executeOperator(java.util.LinkedList<ValueBuffer> args)
Performs the actual logic of the operator.
|
java.lang.String[] |
getArgumentTypeNames()
Gets the list of names of types of the needed argument values
|
ValueBuffer |
getIdentityElement()
Gets the identity element of the operator in its domain.
|
TypeDeclaration |
getReturnTypeDeclaration()
Gets the full type declaration of the type of the return value.
|
java.lang.String |
getReturnTypeName()
Gets the name of the type of the return value
|
java.lang.String |
getSignature()
Gets the name of the operator implemented by this implementation object
|
boolean |
isDeterministic()
Tells whether the operator is deterministic with respect to the arguments of its invocations.
|
void |
readExternal(java.io.ObjectInput in) |
static UNIONInvocationResultDetails |
validateExpressionDetails(Heading heading1,
Heading heading2,
java.lang.String relationPredicate1,
java.lang.String relationPredicate2) |
static UNIONInvocationResultDetails |
validateExpressionDetails(Heading heading1,
Heading heading2,
java.lang.String relationPredicate1,
java.lang.String relationPredicate2,
java.util.LinkedHashSet<NameIdentifier> usingAttributes) |
void |
writeExternal(java.io.ObjectOutput out) |
public UNION_RELATION_RELATION(Heading heading)
heading
- the heading that the UNION arguments conform topublic static java.util.Set<TupleBuffer> computePlainUnion(java.util.Collection<TupleBuffer> r1, java.util.Collection<TupleBuffer> r2)
r1
- The first argumentr2
- The second argumentpublic static UNIONInvocationResultDetails validateExpressionDetails(Heading heading1, Heading heading2, java.lang.String relationPredicate1, java.lang.String relationPredicate2) throws UnionHeadingsIncompatibleException
heading1
- the heading of the first argument in a unionheading2
- the heading of the second argument in a unionrelationPredicate2
- The relation predicate of the second argument in a unionrelationPredicate1
- The relation predicate of the first argument in a unionUnionHeadingsIncompatibleException
- if the given headings are not union compatiblepublic static UNIONInvocationResultDetails validateExpressionDetails(Heading heading1, Heading heading2, java.lang.String relationPredicate1, java.lang.String relationPredicate2, java.util.LinkedHashSet<NameIdentifier> usingAttributes) throws UnionHeadingsIncompatibleException, AttributeNotIntervalTypedException, NonExistingAttributeException
heading1
- the heading of the first argument in a unionheading2
- the heading of the second argument in a unionrelationPredicate2
- The relation predicate of the second argument in a unionrelationPredicate1
- The relation predicate of the first argument in a unionusingAttributes
- The names of the interval-typed attributes in the union to be treated in 'USING' mode (empty set for 'plain' unions)UnionHeadingsIncompatibleException
- if the given headings are not union compatibleAttributeNotIntervalTypedException
- If an attribute named in the usingAttributes list is not interval-typedNonExistingAttributeException
- If usingAttributes contains an attribute name that does not appear in the headingpublic ValueBuffer executeOperator(java.util.LinkedList<ValueBuffer> args)
OperatorImplementation_V0104
executeOperator
in interface OperatorImplementation_V0104
args
- the argument list. The list must hold as many ValueBuffer objects as there are arguments to the operator, and each ValueBuffer object holds a value for some argument to the operator. ValueBuffer objects on the list must appear in the same order as the operator argument declarations. Implementations have the option, but are not required, to do a check the conformance of the argument list (the argument count, notably) to the operator signature.public java.lang.String[] getArgumentTypeNames()
OperatorImplementation_V0104
getArgumentTypeNames
in interface OperatorImplementation_V0104
public ValueBuffer getIdentityElement()
AggregationOperatorImplementation
getIdentityElement
in interface AggregationOperatorImplementation
public TypeDeclaration getReturnTypeDeclaration()
OperatorImplementation_V0105
getReturnTypeDeclaration
in interface OperatorImplementation_V0105
public java.lang.String getReturnTypeName()
OperatorImplementation_V0104
getReturnTypeName
in interface OperatorImplementation_V0104
public java.lang.String getSignature()
OperatorImplementation_V0104
getSignature
in interface OperatorImplementation_V0104
public boolean isDeterministic()
OperatorImplementation_V0104
isDeterministic
in interface OperatorImplementation_V0104
public void readExternal(java.io.ObjectInput in)
readExternal
in interface java.io.Externalizable
public void writeExternal(java.io.ObjectOutput out)
writeExternal
in interface java.io.Externalizable