Files
spark/src/DataStreamSuite/ColumnMapExpressions/ColumnMapExpression.cs
T
John Colvin 248e37577f feat: Add DataStreamExpressions
All lex/yacc scanners/parsers are now generated with a proper dotnet
nuget pkg, YaccLexTools.

* Implements BooleanExpressionFilter with the new Parser.
2023-09-29 13:10:49 -04:00

27 lines
796 B
C#

namespace Bts.ColumnMapExpressions;
using Bts.ExpressionCore;
using System.Collections.Immutable;
public class ColumnMapExpression {
public ColumnMapExpression(ImmutableDictionary<string, string> columns, bool isInclusive) {
Columns = columns;
IsInclusive = isInclusive;
}
public ImmutableDictionary<string, string> Columns { get; }
public bool IsInclusive { get; }
public static ColumnMapExpression? Parse(string expression) =>
new Parser().Parse(expression);
public static ColumnMapExpression? Parse(Stream expression) =>
new Parser().Parse(expression);
class Parser : IParser<ColumnMapExpression?> {
public ColumnMapExpression? Parse(Stream expression) =>
new ColumnMapExpressionParser().Parse(expression)?.Expression;
}
}