public abstract class GROUP extends RelationalOperator
Constructor and Description |
---|
GROUP() |
Modifier and Type | Method and Description |
---|---|
static RelationBuffer |
computeGroup(RelationBuffer relationBuffer,
java.util.Map<NameIdentifier,java.util.Set<NameIdentifier>> groupAttributes,
java.util.Set<NameIdentifier> retainedAttributeNames) |
static Relation |
computeGroup(Relation relation,
java.util.Map<NameIdentifier,java.util.Set<NameIdentifier>> groupAttributes) |
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 GROUPInvocationResultDetails |
validateExpressionDetails(Heading heading,
java.util.Map<NameIdentifier,java.util.Set<NameIdentifier>> groupAttributes,
java.lang.String predicate,
java.util.Collection<? extends KeyDef> inputKeySpecifications) |
toString
public static Relation computeGroup(Relation relation, java.util.Map<NameIdentifier,java.util.Set<NameIdentifier>> groupAttributes) throws EvaluationException
relation
- the relation to be subjected to groupinggroupAttributes
- The specification of the groupings to be applied. Each entry consists of an attribute name for the relation-valued attribute in the result, and the set of attributes of this relation that that relation-typed attribute is to include.EvaluationException
- If the evaluation fails for any reasonpublic static RelationBuffer computeGroup(RelationBuffer relationBuffer, java.util.Map<NameIdentifier,java.util.Set<NameIdentifier>> groupAttributes, java.util.Set<NameIdentifier> retainedAttributeNames)
relationBuffer
- the relation to be subjected to groupinggroupAttributes
- The specification of the groupings to be applied. Each entry consists of an attribute name for the relation-valued attribute in the result, and the set of attributes of this relation that that relation-typed attribute is to include.retainedAttributeNames
- The set of attributes to retain from the input expression, which is also the set of attributes to group bypublic static GROUPInvocationResultDetails validateExpressionDetails(Heading heading, java.util.Map<NameIdentifier,java.util.Set<NameIdentifier>> groupAttributes, java.lang.String predicate, java.util.Collection<? extends KeyDef> inputKeySpecifications) throws NonExistingAttributeException, GroupAttributeOverlapException, AttributeGroupedTwiceException
heading
- The heading of the relation that is subjected to groupinggroupAttributes
- The specification of the groupings to be applied. Each entry consists of an attribute name for the relation-valued attribute in the result, and the set of attributes of this relation that that relation-typed attribute is to include.predicate
- The predicate of which the input relation is the extensioninputKeySpecifications
- The key specifications known to be satisfied by the input relationNonExistingAttributeException
- If an attribute is specified for inclusion in an RVA that does not exist in the inputGroupAttributeOverlapException
- If an attribute name is used for specifying an output RVA that also appears in the heading of the input. Note thatAttributeGroupedTwiceException
- If an attribute is specified for inclusion in more than one RVApublic 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