Beispiel #1
0
        protected override void ProduceBinaryQueryPlan(PlanNode left, PlanNode right)
        {
            var node = new UnionPlanNode(
                left, right, this, typeof(TKey), typeof(TPayload), false, false, this.errorMessages, false);

            this.Observer.ProduceQueryPlan(node);
        }
Beispiel #2
0
        private BinaryPipe <TKey, TPayload, TPayload, TPayload> GetPipe(IStreamObserver <TKey, TPayload> observer)
        {
            var lookupKey = CacheKey.Create();

            var generatedPipeType = cachedPipes.GetOrAdd(lookupKey, key => UnionTemplate.GenerateUnionPipeClass(this));
            Func <PlanNode, PlanNode, IBinaryObserver, BinaryPlanNode> planNode = ((PlanNode left, PlanNode right, IBinaryObserver o) =>
            {
                var node = new UnionPlanNode(
                    left, right, o, typeof(TKey), typeof(TPayload), false, true, this.ErrorMessages);
                return(node);
            });

            var instance    = Activator.CreateInstance(generatedPipeType.Item1, this, observer, planNode);
            var returnValue = (BinaryPipe <TKey, TPayload, TPayload, TPayload>)instance;

            return(returnValue);
        }