Class Aggregand
Expression which is used to "group by" in an aggregation from one table to another.
Implements
Inherited Members
Namespace: Mangrove.MetricSetSyntaxTree.ExpressionNodes
Assembly: MetricSetSyntaxTree.dll
Syntax
public class Aggregand : Expression<Aggregand, Aggregation>, IVisitable<IExpressionVisitor>, ICloneable<Aggregand, Aggregation, Expression>, ICloneable<Expression>, IDirectedAcyclicGraph<Expression>
Remarks
To motivate aggregands, consider the SQL statement:
WITH BASE_TABLE AS ( SELECT State, City, Population FROM DATA_SOURCE ), STATEWIDE_TABLE AS ( SELECT State, SUM(Population) AS Population FROM BASE_TABLE GROUP BY State )
In generating the state-wide table, the GROUP BY
clause refers to the
State
column in BASE_TABLE
. In Mangrove, an Aggregand
provides this link.
Constructors
View SourceAggregand(Aggregation, Expression)
Declaration
public Aggregand(Aggregation table, Expression source)
Parameters
Type | Name | Description |
---|---|---|
Aggregation | table | |
Expression | source |
Properties
View SourceParents
Declaration
[JsonIgnore]
public override IReadOnlyList<Expression> Parents { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<Expression> |
Overrides
View SourceSource
One of the columns you "group by" to get from the Source table to the "target" table.
Declaration
public Expression Source { get; }
Property Value
Type | Description |
---|---|
Expression |
Methods
View SourceAccept(IExpressionVisitor)
Declaration
public override void Accept(IExpressionVisitor visitor)
Parameters
Type | Name | Description |
---|---|---|
IExpressionVisitor | visitor |
Overrides
View SourceClone(Aggregation, IReadOnlyList<Expression>)
Declaration
public override Aggregand Clone(Aggregation table, IReadOnlyList<Expression> parents)
Parameters
Type | Name | Description |
---|---|---|
Aggregation | table | |
IReadOnlyList<Expression> | parents |
Returns
Type | Description |
---|---|
Aggregand |
Overrides
Mangrove.MetricSetSyntaxTree.Expression<Mangrove.MetricSetSyntaxTree.ExpressionNodes.Aggregand, Mangrove.MetricSetSyntaxTree.TableNodes.Aggregation>.Clone(Mangrove.MetricSetSyntaxTree.TableNodes.Aggregation, System.Collections.Generic.IReadOnlyList<Mangrove.MetricSetSyntaxTree.Expression>)