public final class UNPACK_RELATION extends java.lang.Object implements OperatorImplementation_V0105
Constructor and Description |
---|
UNPACK_RELATION(Heading heading,
MyReadOnlyLinkedHashMap<NameIdentifier,java.util.Map<java.lang.String,OperatorImplementation_V0104>> intervalTypedAttributesIntervalOperatorImplementations,
MyReadOnlyMap<NameIdentifier,IntervalTypeImplementation> intervalTypedAttributesIntervalTypeImplementations)
Creates the UNPACK_RELATION_RELATION
|
Modifier and Type | Method and Description |
---|---|
static java.util.Set<TupleBuffer> |
computeUnpack(java.util.Collection<TupleBuffer> r1,
MyReadOnlyLinkedHashMap<NameIdentifier,java.util.Map<java.lang.String,OperatorImplementation_V0104>> intervalTypedAttributesIntervalOperatorImplementations,
MyReadOnlyMap<NameIdentifier,IntervalTypeImplementation> intervalTypeImplementations)
The most stupid way conceivable to compute a relation union of relations that have no interval-typed attributes
|
static RelationBuffer |
computeUnpack(RelationBuffer relationBuffer,
MyReadOnlyLinkedHashMap<NameIdentifier,java.util.Map<java.lang.String,OperatorImplementation_V0104>> intervalTypedAttributesIntervalOperatorImplementations,
MyReadOnlyMap<NameIdentifier,IntervalTypeImplementation> typeImplementationsMap) |
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 java.util.Set<MyReadOnlyMap<NameIdentifier,ValueBuffer>> |
unpackTuple(TupleBuffer t,
MyReadOnlyMap<NameIdentifier,IntervalTypeImplementation> intervalTypeImplementations,
MyReadOnlyLinkedHashMap<NameIdentifier,java.util.Map<java.lang.String,OperatorImplementation_V0104>> intervalTypedAttributesIntervalOperatorImplementations) |
static UNPACKInvocationResultDetails |
validateExpressionDetails(Heading inputHeading,
java.util.Set<NameIdentifier> unpackAttributeNames,
java.lang.String inputPredicate) |
static UNPACKInvocationResultDetails |
validateExpressionDetails(Heading inputHeading,
java.util.Set<NameIdentifier> unpackAttributeNames,
java.lang.String inputPredicate,
java.util.Collection<? extends KeyDef> inputKeySpecifications) |
void |
writeExternal(java.io.ObjectOutput out) |
public UNPACK_RELATION(Heading heading, MyReadOnlyLinkedHashMap<NameIdentifier,java.util.Map<java.lang.String,OperatorImplementation_V0104>> intervalTypedAttributesIntervalOperatorImplementations, MyReadOnlyMap<NameIdentifier,IntervalTypeImplementation> intervalTypedAttributesIntervalTypeImplementations)
heading
- the heading that the UNPACK arguments conform tointervalTypedAttributesIntervalOperatorImplementations
- A map mapping the attribute names to a corresponding collection of interval operators (this collection takes itself the form of a mapping from operator names to interval operator implementations). The map is required to hold at least the OPERATORNAMES.SPLITBY
, OPERATORNAMES.IMINUS
, OPERATORNAMES.IINTERSECT
and OPERATORNAMES.ISEMPTYINTERVAL
implementations for each attribute.intervalTypedAttributesIntervalTypeImplementations
- A map mapping the interval-typed attribute names to their type implementations. The keySet() of this map must be equal to the keySet() of the intervalTypedAttributesIntervalOperatorImplementations Map.public static java.util.Set<TupleBuffer> computeUnpack(java.util.Collection<TupleBuffer> r1, MyReadOnlyLinkedHashMap<NameIdentifier,java.util.Map<java.lang.String,OperatorImplementation_V0104>> intervalTypedAttributesIntervalOperatorImplementations, MyReadOnlyMap<NameIdentifier,IntervalTypeImplementation> intervalTypeImplementations)
r1
- The first argumentintervalTypedAttributesIntervalOperatorImplementations
- the applicable interval operator implementations per attribute to be unpackedintervalTypeImplementations
- the applicable interval type implementations per attribute to be unpackedpublic static RelationBuffer computeUnpack(RelationBuffer relationBuffer, MyReadOnlyLinkedHashMap<NameIdentifier,java.util.Map<java.lang.String,OperatorImplementation_V0104>> intervalTypedAttributesIntervalOperatorImplementations, MyReadOnlyMap<NameIdentifier,IntervalTypeImplementation> typeImplementationsMap)
relationBuffer
- The buffer holding the relation to be unpackedintervalTypedAttributesIntervalOperatorImplementations
- The map of applicable operators per unpack attributetypeImplementationsMap
- The map of applicable type implementations per attribute to be unpackedpublic static java.util.Set<MyReadOnlyMap<NameIdentifier,ValueBuffer>> unpackTuple(TupleBuffer t, MyReadOnlyMap<NameIdentifier,IntervalTypeImplementation> intervalTypeImplementations, MyReadOnlyLinkedHashMap<NameIdentifier,java.util.Map<java.lang.String,OperatorImplementation_V0104>> intervalTypedAttributesIntervalOperatorImplementations)
t
- A tuple with interval-type attributes to be unpacked to point valuesintervalTypeImplementations
- the applicable interval type implementations per attribute to be unpackedintervalTypedAttributesIntervalOperatorImplementations
- the applicable interval operator implementations per attribute to be unpackedpublic static UNPACKInvocationResultDetails validateExpressionDetails(Heading inputHeading, java.util.Set<NameIdentifier> unpackAttributeNames, java.lang.String inputPredicate) throws NonExistingAttributeException, AttributeNotIntervalTypedException, TypeIsNotOrdinalException
inputHeading
- the heading of the relation subjected to an UNPACK.unpackAttributeNames
- the set of attribute names to UNPACK over.inputPredicate
- The predicate of which the input is the extension.NonExistingAttributeException
- if an unpack attribute is specified that is not present in the inputAttributeNotIntervalTypedException
- if an unpack attribute is specified that is not interval-typedTypeIsNotOrdinalException
- If the unpack attribute is of an interval type that is not based on an ordinal base typepublic static UNPACKInvocationResultDetails validateExpressionDetails(Heading inputHeading, java.util.Set<NameIdentifier> unpackAttributeNames, java.lang.String inputPredicate, java.util.Collection<? extends KeyDef> inputKeySpecifications) throws NonExistingAttributeException, AttributeNotIntervalTypedException, TypeIsNotOrdinalException
inputHeading
- the heading of the relation subjected to an UNPACK.unpackAttributeNames
- the set of attribute names to UNPACK over.inputPredicate
- The predicate of which the input is the extension.inputKeySpecifications
- The key specifications that the input is known to satisfy.NonExistingAttributeException
- if an unpack attribute is specified that is not present in the inputAttributeNotIntervalTypedException
- if an unpack attribute is specified that is not interval-typedTypeIsNotOrdinalException
- If the unpack attribute is of an interval type that is not based on an ordinal base typepublic 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 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