Show / Hide Table of Contents

Class Extern

Wrapper around a per-row computation that is fabric-specific.

Inheritance
Object
Expression
Expression<Extern, Table>
Extern
Implements
IVisitable<IExpressionVisitor>
ICloneable<Extern, Table, Expression>
ICloneable<Expression>
IDirectedAcyclicGraph<Expression>
Inherited Members
Expression<Extern, Table>.Table
Expression<Extern, Table>.Clone(Table, IReadOnlyList<Expression>)
Expression<Extern, Table>.Clone(IReadOnlyList<Expression>)
Expression.Table
Expression.Clone(IReadOnlyList<Expression>)
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Namespace: Mangrove.MetricSetSyntaxTree.ExpressionNodes
Assembly: MetricSetSyntaxTree.dll
Syntax
public class Extern : Expression<Extern, Table>, IVisitable<IExpressionVisitor>, ICloneable<Extern, Table, Expression>, ICloneable<Expression>, IDirectedAcyclicGraph<Expression>
Remarks

The mangrove Expression classes are not flexible enough to capture all possible row-level computations in all possible compute fabrics. For example, how to capture C#'s LINQ expressions for Scope, or all possible Scala one-liners for Spark? The Extern class allows Mangrove to capture "black box" computations which do not make sense as standard expression trees.

Constructors

View Source

Extern(Table, ExternKind, TypeKind, IReadOnlyList<TokenOrExpression>, IReadOnlyList<String>, IReadOnlyList<String>)

Standard constructor, following Roslyn.

Declaration
[JsonConstructor]
public Extern(Table table, ExternKind externKind, TypeKind type, IReadOnlyList<TokenOrExpression> tokensAndDependencies, IReadOnlyList<string> resources = null, IReadOnlyList<string> imports = null)
Parameters
Type Name Description
Table table

Table this expression should live in.

ExternKind externKind

Compute fabric this extern makes sense in.

TypeKind type

Type of the output of this extern.

IReadOnlyList<TokenOrExpression> tokensAndDependencies

List of components making up the expression, can be a mixture of string tokens, and expressions.

IReadOnlyList<String> resources

Language-specific files (e.g. DLL or JAR) this extern depends on.

IReadOnlyList<String> imports

Namespace imports this extern needs.

Properties

View Source

Dependencies

Hard-coded ordered list of expressions that this one depends on. For example, the extern f_bar(a, b) would have dependencies with names "a" and "b". In some contexts, this needs to be a list only of ColumnReferences, such as if this extern corresponds to a scope enricher or spark jar.

Declaration
[JsonIgnore]
public IReadOnlyList<Expression> Dependencies { get; }
Property Value
Type Description
IReadOnlyList<Expression>
View Source

ExternKind

Computation fabric this extern is specific to.

Declaration
public ExternKind ExternKind { get; }
Property Value
Type Description
ExternKind
View Source

Imports

Namespaces (whether C# or Java / Scala) imported by this extern.

Declaration
public IReadOnlyList<string> Imports { get; }
Property Value
Type Description
IReadOnlyList<String>
View Source

Parents

Declaration
[JsonIgnore]
public override IReadOnlyList<Expression> Parents { get; }
Property Value
Type Description
IReadOnlyList<Expression>
Overrides
Expression.Parents
View Source

Resources

The names of resources (DLLs, NuGet packages, or JAR files) this extern needs.

Declaration
public IReadOnlyList<string> Resources { get; }
Property Value
Type Description
IReadOnlyList<String>
View Source

Tokens

Raw string snippets to interleave with the names of Dependencies. For example, the extern f_bar(a, b) would have tokens "f_bar(", ", ", and ")".

Declaration
[JsonIgnore]
public IReadOnlyList<string> Tokens { get; }
Property Value
Type Description
IReadOnlyList<String>
View Source

TokensAndDependencies

List of either Expression dependencies or string snippets.

Declaration
public IReadOnlyList<TokenOrExpression> TokensAndDependencies { get; }
Property Value
Type Description
IReadOnlyList<TokenOrExpression>
View Source

Type

The type (e.g. Double or DateTime) of this extern.

Declaration
public TypeKind Type { get; }
Property Value
Type Description
TypeKind

Methods

View Source

Accept(IExpressionVisitor)

Declaration
public override void Accept(IExpressionVisitor visitor)
Parameters
Type Name Description
IExpressionVisitor visitor
Overrides
Expression.Accept(IExpressionVisitor)
View Source

Clone(Table, IReadOnlyList<Expression>)

Declaration
public override Extern Clone(Table table, IReadOnlyList<Expression> parents)
Parameters
Type Name Description
Table table
IReadOnlyList<Expression> parents
Returns
Type Description
Extern
Overrides
Mangrove.MetricSetSyntaxTree.Expression<Mangrove.MetricSetSyntaxTree.ExpressionNodes.Extern, Mangrove.MetricSetSyntaxTree.Table>.Clone(Mangrove.MetricSetSyntaxTree.Table, System.Collections.Generic.IReadOnlyList<Mangrove.MetricSetSyntaxTree.Expression>)
View Source

Clone(Table, Nullable<ExternKind>, Nullable<TypeKind>, IReadOnlyList<TokenOrExpression>, IReadOnlyList<String>, IReadOnlyList<String>)

Declaration
public Extern Clone(Table table = null, ExternKind? externKind = default(ExternKind? ), TypeKind? type = default(TypeKind? ), IReadOnlyList<TokenOrExpression> tokensAndDependencies = null, IReadOnlyList<string> resources = null, IReadOnlyList<string> imports = null)
Parameters
Type Name Description
Table table
Nullable<ExternKind> externKind
Nullable<TypeKind> type
IReadOnlyList<TokenOrExpression> tokensAndDependencies
IReadOnlyList<String> resources
IReadOnlyList<String> imports
Returns
Type Description
Extern
View Source

ToString()

Interleave Tokens and names of Dependencies to create a valid computation in the underlying compute fabric. For example, if dependencies have names "a" and "b", and the tokens are "f_bar(", ",", and ")", this would return "f_bar(a,b)".

Declaration
public override string ToString()
Returns
Type Description
String
Overrides
Expression.ToString()

Implements

IVisitable<TVisitor>
ICloneable<TSubnode, TIdentifier, TNode>
ICloneable<T>
IDirectedAcyclicGraph<T>

Extension Methods

ExpressionExtensions.WrapUniqueName(Expression, String)
ExpressionExtensions.WrapName(Expression, String)
ExpressionExtensions.Unwrap(Expression, Boolean)
ExpressionExtensions.UnwrapParentheses(Expression)
ExpressionExtensions.NeedsColumnReferenceWrap(Expression)
ExpressionExtensions.TopParentsOfType<TParent>(Expression)
ExpressionExtensions.References(Expression, ISet<Table>)
ExpressionExtensions.IsAggregation(Expression)
ExpressionExtensions.IsOperation(Expression)
ExpressionExtensions.IsConstant(Expression)
ExpressionExtensions.Type(Expression)
ExpressionExtensions.IsOfNullableType(Expression)
ExpressionExtensions.IsOfNonNullableType(Expression)
IDirectedAcyclicGraphExtensions.Ancestors(Expression, Boolean)
IDirectedAcyclicGraphExtensions.Closure(Expression)
ObjectExtensions.EventId(Object)
  • View Source
Back to top Generated by DocFX