Class ExpressionEmitterBase
Base class for an expression visitor.
Inheritance
ExpressionEmitterBase
Assembly: MetricSetEmitters.dll
Syntax
public abstract class ExpressionEmitterBase : LoggingExpressionVisitorBase, IGenericExpressionVisitor<string>, IExpressionVisitor, IGenericVisitor<string>
Constructors
View Source
ExpressionEmitterBase(ILogger)
Declaration
public ExpressionEmitterBase(ILogger logger)
Parameters
Type |
Name |
Description |
ILogger |
logger |
|
Fields
View Source
_output
Declaration
protected StringBuilder _output
Field Value
Properties
View Source
AssignmentOperator
String representing the assigment operator.
Declaration
protected abstract string AssignmentOperator { get; }
Property Value
View Source
BinaryAggregationToOperator
A map of each supported binary aggregation type to the corresponding representation as a tuple of strings.
Declaration
protected abstract IReadOnlyDictionary<BinaryAggregationKind, (string prefix, string separator, string suffix)> BinaryAggregationToOperator { get; }
Property Value
View Source
BinaryOperationToOperator
A map of each supported binary operation type to the corresponding representation as a tuple of strings.
Declaration
protected abstract IReadOnlyDictionary<BinaryOperationKind, (string prefix, string infix, string suffix)> BinaryOperationToOperator { get; }
Property Value
View Source
LiteralFalse
Declaration
protected abstract string LiteralFalse { get; }
Property Value
View Source
LiteralTrue
Declaration
protected abstract string LiteralTrue { get; }
Property Value
View Source
Min_Max_Value
Declaration
protected abstract Dictionary<string, string> Min_Max_Value { get; }
Property Value
View Source
NegativeInfinity
Declaration
protected abstract string NegativeInfinity { get; }
Property Value
View Source
PositiveInfinity
Declaration
protected abstract string PositiveInfinity { get; }
Property Value
View Source
Result
Declaration
public string Result { get; }
Property Value
View Source
TernaryOperationToOperator
A map of each supported ternary operation type to the corresponding representation as a tuple of strings.
Declaration
protected abstract IReadOnlyDictionary<TernaryOperationKind, (string prefix, string leftInfix, string rightInfix, string suffix)> TernaryOperationToOperator { get; }
Property Value
View Source
TypeKindToParseFromStringOperator
A map of each supported type to the its corresponding parse from string operation as a tuple of strings.
Declaration
protected abstract IReadOnlyDictionary<TypeKind, (string prefix, string suffix)> TypeKindToParseFromStringOperator { get; }
Property Value
View Source
TypeToName
A map of each supported data type to the corresponding string representation.
Declaration
protected abstract IReadOnlyDictionary<TypeKind, string> TypeToName { get; }
Property Value
View Source
TypeToNull
A map of each supported nullable data type to the corresponding string representation of the null value.
Declaration
protected abstract IReadOnlyDictionary<TypeKind, string> TypeToNull { get; }
Property Value
View Source
UnaryAggregationToOperator
A map of each supported unary aggregation type to the corresponding representation as a tuple of strings.
Declaration
protected abstract IReadOnlyDictionary<UnaryAggregationKind, (string op, string prefix, string suffix)> UnaryAggregationToOperator { get; }
Property Value
View Source
UnaryOperationToOperator
A map of each supported unary operation type to the corresponding representation as a tuple of strings.
Declaration
protected abstract IReadOnlyDictionary<UnaryOperationKind, (string prefix, string suffix)> UnaryOperationToOperator { get; }
Property Value
View Source
VectorOperationToOperator
A map of each supported vector operation type to the corresponding representation as a tuple of strings.
Declaration
protected abstract IReadOnlyDictionary<VectorOperationKind, (string prefix, string separator, string suffix)> VectorOperationToOperator { get; }
Property Value
View Source
WindowFunctionSyntax
The representation as a tuple of strings of the syntax for using a window function.
Declaration
protected abstract (string prefix, string separator, string suffix) WindowFunctionSyntax { get; }
Property Value
Methods
View Source
AcceptAndAppend(Object[])
Declaration
protected void AcceptAndAppend(params object[] objects)
Parameters
Type |
Name |
Description |
Object[] |
objects |
|
View Source
AcceptWithSeparator(IEnumerable<Expression>, String, String, String)
Declaration
protected void AcceptWithSeparator(IEnumerable<Expression> expressions, string separator, string prefix = "", string suffix = "")
Parameters
View Source
CreateVectorOperationFromBinary(VectorOperationKind, IEnumerable<Expression>)
Subclasses may call this when the compute fabric does not support "native"
vector operations. This recursively creates something like max(a, max(b, c))
instead.
Declaration
protected void CreateVectorOperationFromBinary(VectorOperationKind operation, IEnumerable<Expression> arguments)
Parameters
View Source
Escape(String)
Declaration
protected abstract string Escape(string input)
Parameters
Type |
Name |
Description |
String |
input |
|
Returns
View Source
Reset()
Declaration
View Source
ThrowHelpfulError(Object)
Declaration
protected static void ThrowHelpfulError(object received)
Parameters
Type |
Name |
Description |
Object |
received |
|
View Source
VisitCreateHistogramExpression(UnaryOperation)
Declaration
protected abstract void VisitCreateHistogramExpression(UnaryOperation expr)
Parameters
View Source
VisitParseExpression(UnaryOperation)
Declaration
protected void VisitParseExpression(UnaryOperation expr)
Parameters
View Source
VisitTypeCastExpression(UnaryOperation)
Declaration
protected abstract void VisitTypeCastExpression(UnaryOperation expr)
Parameters
View Source
VisitWithTracing(Aggregand)
Declaration
public override void VisitWithTracing(Aggregand expr)
Parameters
Overrides
View Source
VisitWithTracing(BinaryAggregation)
Declaration
public override void VisitWithTracing(BinaryAggregation expr)
Parameters
Overrides
View Source
VisitWithTracing(BinaryOperation)
Declaration
public override void VisitWithTracing(BinaryOperation expr)
Parameters
Overrides
View Source
VisitWithTracing(DataSourceColumn)
Declaration
public override void VisitWithTracing(DataSourceColumn expr)
Parameters
Overrides
View Source
VisitWithTracing(Extern)
Declaration
public override void VisitWithTracing(Extern expr)
Parameters
Type |
Name |
Description |
Extern |
expr |
|
Overrides
View Source
VisitWithTracing(Filter)
Declaration
public override void VisitWithTracing(Filter expr)
Parameters
Type |
Name |
Description |
Filter |
expr |
|
Overrides
View Source
VisitWithTracing(JoinKey)
Declaration
public override void VisitWithTracing(JoinKey expr)
Parameters
Overrides
View Source
VisitWithTracing(Literal)
Declaration
public override void VisitWithTracing(Literal expr)
Parameters
Overrides
View Source
VisitWithTracing(RuntimeVariable)
Declaration
public override void VisitWithTracing(RuntimeVariable expr)
Parameters
Overrides
View Source
VisitWithTracing(TernaryOperation)
Declaration
public override void VisitWithTracing(TernaryOperation expr)
Parameters
Overrides
View Source
VisitWithTracing(UnaryAggregation)
Declaration
public override void VisitWithTracing(UnaryAggregation expr)
Parameters
Overrides
View Source
VisitWithTracing(UnaryOperation)
Declaration
public override void VisitWithTracing(UnaryOperation expr)
Parameters
Overrides
View Source
VisitWithTracing(UnaryWindowFunction)
Declaration
public override void VisitWithTracing(UnaryWindowFunction expr)
Parameters
Overrides
View Source
VisitWithTracing(UnionExpression)
A UNION operation combines rows from different tables that all have same schema. The expressions in a Union table are
pointers to the individual columnReferences that are unioned together in a particular column. So to visit a UnionExpression,
we actually need to visit one of the parent ColumnReferences that it points to.
Declaration
public override void VisitWithTracing(UnionExpression expr)
Parameters
Overrides
View Source
VisitWithTracing(VectorOperation)
Declaration
public override void VisitWithTracing(VectorOperation expr)
Parameters
Overrides
Implements
Extension Methods