public abstract class UNGROUP extends RelationalOperator
Constructor and Description |
---|
UNGROUP() |
Modifier and Type | Method and Description |
---|---|
static RelationBuffer |
computeUngroup(RelationBuffer relationBuffer,
java.util.Map<NameIdentifier,TypeDeclaration> ungroupAttributes) |
static Relation |
computeUngroup(Relation relation,
NameIdentifier... ungroupAttributes) |
int |
getMaximumArgumentCount()
Gets the maximum argument count for this operator.
|
int |
getMinimumArgumentCount()
Gets the minimum argument count for this operator.
|
java.lang.String |
getName()
Gets the operator name
|
boolean |
isMonoRelationOperator()
Checks if the operator takes only one Relation as input
|
static UNGROUPInvocationResultDetails |
validateExpressionDetails(Heading heading,
java.util.Set<NameIdentifier> ungroupAttributes,
java.lang.String inputPredicate,
java.util.Collection<? extends KeyDef> inputKeySpecifications) |
toString
public static Relation computeUngroup(Relation relation, NameIdentifier... ungroupAttributes) throws EvaluationException
relation
- the relation to be ungrouped according to the specs in ungroupAttributesungroupAttributes
- the list of relation-typed attributes to be ungrouped in the resultEvaluationException
- if the given relation and ungroup specs are incompatiblepublic static RelationBuffer computeUngroup(RelationBuffer relationBuffer, java.util.Map<NameIdentifier,TypeDeclaration> ungroupAttributes)
relationBuffer
- the relationBuffer holding the body/tuples to be ungrouped according to the specs in ungroupAttributesungroupAttributes
- the list of relation-typed attributes to be ungrouped in the result, mapped to their (nonscalar) typedeclaration in the heading of the input relation. This map must contain ONLY the ungroup attributes.public static UNGROUPInvocationResultDetails validateExpressionDetails(Heading heading, java.util.Set<NameIdentifier> ungroupAttributes, java.lang.String inputPredicate, java.util.Collection<? extends KeyDef> inputKeySpecifications) throws UnGroupAttributeIsNotRelationTypedException, UnGroupCausesDuplicateAttributeException, MultipleUngroupNotSupportedException
heading
- the heading of the relation to be ungrouped according to the specs in ungroupAttributesungroupAttributes
- the list of relation-typed attributes to be ungrouped in the resultinputPredicate
- The predicate of the input expression. If unknown, use the empty string.inputKeySpecifications
- The key specifications of the input expression. If unknown, an empty collection can be passed and the input will then be assumed to be all-key.UnGroupAttributeIsNotRelationTypedException
- if a non-relation-typed attribute is specified among the ungroupAttributesUnGroupCausesDuplicateAttributeException
- if an attribute of a relation-typed attribute to be ungrouped also appears in the heading of the relation to be ungrouped itselfMultipleUngroupNotSupportedException
- if the ungroupAttributes contain more than one attributepublic final int getMaximumArgumentCount()
RelationalOperator
getMaximumArgumentCount
in class RelationalOperator
public final int getMinimumArgumentCount()
RelationalOperator
getMinimumArgumentCount
in class RelationalOperator
public final java.lang.String getName()
RelationalOperator
getName
in class RelationalOperator
public final boolean isMonoRelationOperator()
RelationalOperator
isMonoRelationOperator
in class RelationalOperator