예제 #1
0
        public void SortMergeFullJoin()
        {
            using (FullMergeJoinUsersToPeopleByEmail join = new FullMergeJoinUsersToPeopleByEmail())
            {
                join.Left(new GenericEnumerableOperation(left))
                .Right(new GenericEnumerableOperation(right));
                join.PrepareForExecution(new SingleThreadedPipelineExecuter());
                IEnumerable <Row> result = join.Execute(null);
                List <Row>        items  = new List <Row>(result);

                Assert.Equal(3, items.Count);

                Assert.Equal(3, items[0]["person_id"]);

                Assert.Null(items[1]["person_id"]);
                Assert.Equal("bar", items[1]["name"]);

                Assert.Null(items[2]["name"]);
                Assert.Equal(5, items[2]["person_id"]);
            }
        }
예제 #2
0
        public void SortMergeFullJoinMergesMultipleNonMatchingRightRowsAtEnd()
        {
            AddPerson(8, "*****@*****.**");
            AddPerson(10, "*****@*****.**");

            using (FullMergeJoinUsersToPeopleByEmail join = new FullMergeJoinUsersToPeopleByEmail())
            {
                join.Left(new GenericEnumerableOperation(left))
                .Right(new GenericEnumerableOperation(right));
                join.PrepareForExecution(new SingleThreadedPipelineExecuter());
                IEnumerable <Row> result = join.Execute(null);
                List <Row>        items  = new List <Row>(result);

                Assert.Equal(5, items.Count);
                Assert.Equal(8, items[3]["person_id"]);
                Assert.Null(items[3]["name"]);

                Assert.Equal(10, items[4]["person_id"]);
                Assert.Null(items[4]["name"]);
            }
        }
예제 #3
0
        public async Task SortMergeFullJoinMergesMultipleNonMatchingLeftRowsAtEnd()
        {
            AddUser("toby", "*****@*****.**");
            AddUser("tom", "*****@*****.**");

            using (FullMergeJoinUsersToPeopleByEmail join = new FullMergeJoinUsersToPeopleByEmail())
            {
                join.Left(new GenericEnumerableOperation(left))
                .Right(new GenericEnumerableOperation(right));
                join.PrepareForExecution(new SingleThreadedPipelineExecuter());
                IAsyncEnumerable <Row> result = join.Execute(null);
                List <Row>             items  = await result.ToListAsync();

                Assert.Equal(5, items.Count);
                Assert.Null(items[3]["person_id"]);
                Assert.Equal("toby", items[3]["name"]);

                Assert.Null(items[4]["person_id"]);
                Assert.Equal("tom", items[4]["name"]);
            }
        }
예제 #4
0
        public void SortMergeFullJoinMergesMultipleNonMatchingRightRowsAtEnd()
        {
            AddPerson(8, "*****@*****.**");
            AddPerson(10, "*****@*****.**");

            using (FullMergeJoinUsersToPeopleByEmail join = new FullMergeJoinUsersToPeopleByEmail())
            {
                join.Left(new GenericEnumerableOperation(left))
                    .Right(new GenericEnumerableOperation(right));
                join.PrepareForExecution(new SingleThreadedPipelineExecuter());
                IEnumerable<Row> result = join.Execute(null);
                List<Row> items = new List<Row>(result);

                Assert.Equal(5, items.Count);
                Assert.Equal(8, items[3]["person_id"]);
                Assert.Null(items[3]["name"]);

                Assert.Equal(10, items[4]["person_id"]);
                Assert.Null(items[4]["name"]);
            }
        }
예제 #5
0
        public void SortMergeFullJoin()
        {
            using (FullMergeJoinUsersToPeopleByEmail join = new FullMergeJoinUsersToPeopleByEmail())
            {
                join.Left(new GenericEnumerableOperation(left))
                    .Right(new GenericEnumerableOperation(right));
                join.PrepareForExecution(new SingleThreadedPipelineExecuter());
                IEnumerable<Row> result = join.Execute(null);
                List<Row> items = new List<Row>(result);

                Assert.Equal(3, items.Count);

                Assert.Equal(3, items[0]["person_id"]);

                Assert.Null(items[1]["person_id"]);
                Assert.Equal("bar", items[1]["name"]);

                Assert.Null(items[2]["name"]);
                Assert.Equal(5, items[2]["person_id"]);
            }
        }