public final class TCLOSE_RELATION extends java.lang.Object implements OperatorImplementation_V0105
| Constructor and Description |
|---|
TCLOSE_RELATION(Heading heading,
java.util.Map<NameIdentifier,NameIdentifier> closureLeftAttributes,
java.util.Map<NameIdentifier,NameIdentifier> closureRightAttributes)
Creates the UNPACK_RELATION_RELATION
|
| Modifier and Type | Method and Description |
|---|---|
static java.util.Set<TupleBuffer> |
computeTclose(MyReadOnlyCollection<TupleBuffer> r,
java.util.Map<NameIdentifier,NameIdentifier> closureLeftAttributes,
java.util.Map<NameIdentifier,NameIdentifier> closureRightAttributes)
Computes the closure in a straightforward way.
|
static RelationBuffer |
computeTClose(RelationBuffer relationBuffer,
java.util.Map<NameIdentifier,NameIdentifier> closureLeftAttributes,
java.util.Map<NameIdentifier,NameIdentifier> closureRightAttributes)
Computes the closure.
|
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
|
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 TCLOSEInvocationResultDetails |
validateExpressionDetails(Heading inputHeading,
java.util.Map<NameIdentifier,NameIdentifier> matchby,
java.lang.String inputPredicate) |
void |
writeExternal(java.io.ObjectOutput out) |
public TCLOSE_RELATION(Heading heading, java.util.Map<NameIdentifier,NameIdentifier> closureLeftAttributes, java.util.Map<NameIdentifier,NameIdentifier> closureRightAttributes)
heading - the heading that the UNPACK arguments conform toclosureLeftAttributes - The from-to mapping of the closure operationclosureRightAttributes - The to-from mapping of the closure operationpublic static java.util.Set<TupleBuffer> computeTclose(MyReadOnlyCollection<TupleBuffer> r, java.util.Map<NameIdentifier,NameIdentifier> closureLeftAttributes, java.util.Map<NameIdentifier,NameIdentifier> closureRightAttributes)
r - The relation of which a closure over some set of attributes is to be computedclosureLeftAttributes - The map mapping the 'from' attributes to the 'to' attributes.closureRightAttributes - The map of attributes to be paired, having as key the 'to' attributename, with as corresponding value the name of the corresponding 'from' attribute.public static RelationBuffer computeTClose(RelationBuffer relationBuffer, java.util.Map<NameIdentifier,NameIdentifier> closureLeftAttributes, java.util.Map<NameIdentifier,NameIdentifier> closureRightAttributes)
relationBuffer - a buffer holding a relation to be subjected to a transitive closure operationclosureLeftAttributes - the mapping of which attributes match to which in determining pairs of tuples to apply the transitive operation toclosureRightAttributes - The "to-to-from" mapping of attributes to perform the closure overpublic static TCLOSEInvocationResultDetails validateExpressionDetails(Heading inputHeading, java.util.Map<NameIdentifier,NameIdentifier> matchby, java.lang.String inputPredicate) throws DuplicateClosureAttributeException, ClosureAttributesOmittedException, NonExistingAttributeException, IncompatibleClosureTypesException
inputHeading - The heading of the relation that is subjected to a transitive closure operationmatchby - The specification of which attributes to compare to which when establishing pairs of tuples that are to be subjected to the transitive operationinputPredicate - The relation predicate of which the input relation is the extensionDuplicateClosureAttributeException - If an attribute is mentioned more than once in the matchby specificationClosureAttributesOmittedException - If not all attributes of the input relation have been mentioned for matching in the matchby specNonExistingAttributeException - If an attribute is mentioned in the matchby spec that doesn't appear in the headingIncompatibleClosureTypesException - If two attributes to be compared pairwise in the closure operation have incompatible typespublic ValueBuffer executeOperator(java.util.LinkedList<ValueBuffer> args)
OperatorImplementation_V0104executeOperator in interface OperatorImplementation_V0104args - 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_V0104getArgumentTypeNames in interface OperatorImplementation_V0104public TypeDeclaration getReturnTypeDeclaration()
OperatorImplementation_V0105getReturnTypeDeclaration in interface OperatorImplementation_V0105public java.lang.String getReturnTypeName()
OperatorImplementation_V0104getReturnTypeName in interface OperatorImplementation_V0104public java.lang.String getSignature()
OperatorImplementation_V0104getSignature in interface OperatorImplementation_V0104public boolean isDeterministic()
OperatorImplementation_V0104isDeterministic in interface OperatorImplementation_V0104public void readExternal(java.io.ObjectInput in)
readExternal in interface java.io.Externalizablepublic void writeExternal(java.io.ObjectOutput out)
writeExternal in interface java.io.Externalizable