public AggregateNode(ITupleSource leftSource, IObjectSource rightSource, string name, ExpressionMap expressionMap, IAggregatorFactory aggregatorFactory) : base(leftSource, rightSource) { _name = name; _expressionMap = expressionMap; _aggregatorFactory = aggregatorFactory; }
public AggregateNode(ITupleSource leftSource, IObjectSource rightSource, string name, ExpressionMap expressionMap, IAggregatorFactory aggregatorFactory, bool isSubnetJoin) : base(leftSource, rightSource) { Name = name; ExpressionMap = expressionMap; _aggregatorFactory = aggregatorFactory; _isSubnetJoin = isSubnetJoin; }
public static bool AreEqual(ExpressionMap first, ExpressionMap second) { if (first.Count != second.Count) return false; //Assume values are sorted var pairs = first.Zip(second, System.Tuple.Create); bool result = pairs.All(t => t.Item1.Name == t.Item2.Name && ExpressionComparer.AreEqual(t.Item1.Expression, t.Item2.Expression)); return result; }
AggregateElement IBuilder <AggregateElement> .Build() { Validate(); IBuilder <PatternElement> sourceBuilder = _sourceBuilder; PatternElement sourceElement = sourceBuilder.Build(); var elements = _expressions.Select(x => ToNamedExpression(x.Key, x.Value)); var expressionMap = new ExpressionMap(elements); var aggregateElement = new AggregateElement(Scope.VisibleDeclarations, _resultType, _name, expressionMap, sourceElement, _customFactoryType); return(aggregateElement); }
public static bool AreEqual(ExpressionMap first, ExpressionMap second) { if (first.Count != second.Count) { return(false); } //Assume values are sorted var pairs = first.Zip(second, System.Tuple.Create); bool result = pairs.All(t => t.Item1.Name == t.Item2.Name && ExpressionComparer.AreEqual(t.Item1.Expression, t.Item2.Expression)); return(result); }