Class NaivePrune
Filters out Expressions that are not required for the computation.
Implements
Inherited Members
Namespace: Mangrove.MetricSetTransformers.Pruning
Assembly: MetricSetTransformers.dll
Syntax
public class NaivePrune : LoggingTransformerBase, IMetricsPlanTransformer
Remarks
NOTE: it does not change the Tables in the MetricsPlan.
Constructors
View SourceNaivePrune(IEnumerable<String>, Func<Expression, Boolean>, Boolean, ILogger)
Call with an array of expressions that should exist in the tree.
Declaration
public NaivePrune(IEnumerable<string> requiredExpressions, Func<Expression, bool> mustPrune = null, bool shouldPruneExternTable = false, ILogger logger = null)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<String> | requiredExpressions | |
Func<Expression, Boolean> | mustPrune | |
Boolean | shouldPruneExternTable | |
ILogger | logger |
Remarks
If requiredExpressions
is empty, it is assumed that
everything is required unless it must be removed according to mustPrune
.
The expression names can be either table-qualified (i.e. in the format {tableName}.{columnName}) or bare (i.e. simply {columnName}). In the latter case it is assumed they are the names of some leaf expressions, i.e. expressions with no children (for example, metrics).
Methods
View SourceTransformWithTracing(MetricsPlan, IMetricsPlanValidator)
Declaration
public override MetricsPlan TransformWithTracing(MetricsPlan plan, IMetricsPlanValidator validator)
Parameters
Type | Name | Description |
---|---|---|
MetricsPlan | plan | |
IMetricsPlanValidator | validator |
Returns
Type | Description |
---|---|
MetricsPlan |