Esempio n. 1
0
 public AggregateNode(ITupleSource leftSource, IObjectSource rightSource, string name, ExpressionMap expressionMap, IAggregatorFactory aggregatorFactory)
     : base(leftSource, rightSource)
 {
     _name              = name;
     _expressionMap     = expressionMap;
     _aggregatorFactory = aggregatorFactory;
 }
Esempio n. 2
0
 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;
 }
Esempio n. 3
0
 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;
 }
Esempio n. 4
0
        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);
        }
Esempio n. 5
0
        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);
        }