public final class INTERSECT_RELATION_RELATION extends java.lang.Object implements AggregationOperatorImplementation
INTERSECTUSING_RELATION_RELATION
, where the third argument mentions all the interval-typed attributes of the RELATION arguments' headings, in lexicographical order.Constructor and Description |
---|
INTERSECT_RELATION_RELATION()
Deprecated.
- this constructor is available only for use in the context of the Externalizable machinery
|
Modifier and Type | Method and Description |
---|---|
static RelationBuffer |
computeIntersect(RelationBuffer relationBuffer,
RelationBuffer relationBuffer2) |
static RelationBuffer |
computeIntersectUsing(RelationBuffer relationBuffer,
RelationBuffer relationBuffer2,
java.util.Set<NameIdentifier> partitioningKeys,
MyReadOnlyLinkedHashMap<NameIdentifier,java.util.Map<java.lang.String,OperatorImplementation_V0104>> intervalTypedAttributesIntervalOperatorImplementations,
java.util.Map<NameIdentifier,IntervalTypeImplementation> intervalTypedAttributesIntervalTypeImplementations) |
static java.util.Set<TupleBuffer> |
computePlainIntersection(java.util.Collection<? extends TupleBuffer> r1,
java.util.Collection<? extends TupleBuffer> r2)
Computes the "plain" intersection between two relation values (passed in the form of Collections of TupleBuffers).
|
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.
|
static AggregationOperatorImplementation |
getInstance(Heading heading)
Gets an instance of the operator for the given heading
|
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 INTERSECTInvocationResultDetails |
validateExpressionDetails(Heading heading1,
Heading heading2,
java.util.LinkedHashSet<NameIdentifier> usingAttributes,
java.lang.String predicate1,
java.lang.String predicate2,
java.util.Collection<? extends KeyDef> arg1KeySpecifications,
java.util.Collection<? extends KeyDef> arg2KeySpecifications) |
void |
writeExternal(java.io.ObjectOutput out) |
@Deprecated public INTERSECT_RELATION_RELATION()
public static java.util.Set<TupleBuffer> computePlainIntersection(java.util.Collection<? extends TupleBuffer> r1, java.util.Collection<? extends TupleBuffer> r2)
r1
- The first relationr2
- The second relationpublic static AggregationOperatorImplementation getInstance(Heading heading)
heading
- The heading for which an INTERSECT operator instance is to be createdpublic 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() throws NoIdentityElementException
AggregationOperatorImplementation
getIdentityElement
in interface AggregationOperatorImplementation
NoIdentityElementException
- if no such element exists within the (finite bounds of the) operator's domain.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) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException
public static RelationBuffer computeIntersect(RelationBuffer relationBuffer, RelationBuffer relationBuffer2)
relationBuffer
- a relation buffer the intersection of which with another is to be computedrelationBuffer2
- the other relation buffer to be intersected with the former onepublic static RelationBuffer computeIntersectUsing(RelationBuffer relationBuffer, RelationBuffer relationBuffer2, java.util.Set<NameIdentifier> partitioningKeys, MyReadOnlyLinkedHashMap<NameIdentifier,java.util.Map<java.lang.String,OperatorImplementation_V0104>> intervalTypedAttributesIntervalOperatorImplementations, java.util.Map<NameIdentifier,IntervalTypeImplementation> intervalTypedAttributesIntervalTypeImplementations)
relationBuffer
- a relation the 'USING'-intersection of which with another is to be computedrelationBuffer2
- the other relation with which relation is to be 'USING'-intersectedpartitioningKeys
- The set of attributes in the Heading that are not to be used in 'USING' modusintervalTypedAttributesIntervalOperatorImplementations
- the map of applicable interval-type operators for each of the attributes that are to be treated in 'USING' mode.intervalTypedAttributesIntervalTypeImplementations
- The map holding the IntervalTypeImplementation objects for all of the interval-typed attributes, through which the needed interval operators can be accessedpublic static INTERSECTInvocationResultDetails validateExpressionDetails(Heading heading1, Heading heading2, java.util.LinkedHashSet<NameIdentifier> usingAttributes, java.lang.String predicate1, java.lang.String predicate2, java.util.Collection<? extends KeyDef> arg1KeySpecifications, java.util.Collection<? extends KeyDef> arg2KeySpecifications) throws IncompatibleJoinHeadingsException, AttributeNotIntervalTypedException, JoinUsingAttributeNotCommonBetweenArgumentsException
heading1
- The heading of the first argumentheading2
- The heading of the second argumentusingAttributes
- The in-order set of names of attributes that are to be treated in 'using' mode during the intersectionpredicate1
- The predicate of which the first argument is the extensionpredicate2
- The predicate of which the second argument is the extensionarg1KeySpecifications
- The key specifications known to be satisfied by the first argumentarg2KeySpecifications
- The key specifications known to be satisfied by the second argumentIncompatibleJoinHeadingsException
- If the headings are not intersection compatibleAttributeNotIntervalTypedException
- If an attribute mentioned in usingAttributes is not interval-typedJoinUsingAttributeNotCommonBetweenArgumentsException
- If an attribute mentioned in the usingAttributes is not an attribute in both arguments