Examples of TupleList


Examples of mondrian.calc.TupleList

        final TupleReader tupleReader =
            level.getDimension().isHighCardinality()
                ? new HighCardSqlTupleReader(constraint)
                : new SqlTupleReader(constraint);
        tupleReader.addLevelMembers(level, this, null);
        final TupleList tupleList =
            tupleReader.readMembers(dataSource, null, null);

        assert tupleList.getArity() == 1;
        return Util.cast(tupleList.slice(0));
    }
View Full Code Here

Examples of mondrian.calc.TupleList

    public RolapAxisTest(String name) {
        super(name);
    }

    public void testMemberArrayList() {
        TupleList list = TupleCollections.createList(3);
        list.add(
            Arrays.<Member>asList(
                new TestMember("a"),
                new TestMember("b"),
                new TestMember("c")));
        list.add(
            Arrays.<Member>asList(
                new TestMember("d"),
                new TestMember("e"),
                new TestMember("f")));
        list.add(
            Arrays.<Member>asList(
                new TestMember("g"),
                new TestMember("h"),
                new TestMember("i")));
View Full Code Here

Examples of mondrian.calc.TupleList

        super(name);
    }

    public void testMany() {
        Axis[] axes = new Axis[3];
        TupleList positions = newPositionList(4);
        axes[0] = new RolapAxis(positions);
        positions = newPositionList(3);
        axes[1] = new RolapAxis(positions);
        positions = newPositionList(3);
        axes[2] = new RolapAxis(positions);
View Full Code Here

Examples of mondrian.calc.TupleList

        assertTrue("Pos[2] length equals 1", pos[2] == 1);
    }

    public void testOne() {
        Axis[] axes = new Axis[1];
        TupleList positions = newPositionList(53);
        axes[0] = new RolapAxis(positions);

        Modulos modulosMany = Modulos.Generator.createMany(axes);
        Modulos modulos = Modulos.Generator.create(axes);
        int ordinal = 43;
View Full Code Here

Examples of mondrian.calc.TupleList

        assertTrue("Ordinals are not equal", oMany == o);
    }

    public void testTwo() {
        Axis[] axes = new Axis[2];
        TupleList positions = newPositionList(23);
        axes[0] = new RolapAxis(positions);
        positions = newPositionList(13);
        axes[1] = new RolapAxis(positions);

        Modulos modulosMany = Modulos.Generator.createMany(axes);
View Full Code Here

Examples of mondrian.calc.TupleList

        assertTrue("Ordinals are not equal", oMany == o);
    }

    public void testThree() {
        Axis[] axes = new Axis[3];
        TupleList positions = newPositionList(4);
        axes[0] = new RolapAxis(positions);
        positions = newPositionList(3);
        axes[1] = new RolapAxis(positions);
        positions = newPositionList(2);
        axes[2] = new RolapAxis(positions);
View Full Code Here

Examples of mondrian.calc.TupleList

            + "Row #0: 189\n";
        assertQueryReturns(query, expected);
    }

    public void testOptimizeChildrenForTuplesWithLength1() {
        TupleList memberList =
            productMembersPotScrubbersPotsAndPans(
                salesCubeSchemaReader);

        TupleList tuples = optimizeChildren(memberList);
        assertTrue(
            tuppleListContains(
                tuples,
                member(
                    Id.Segment.toList(
                        "Product", "All Products", "Non-Consumable",
                        "Household", "Kitchen Products", "Pot Scrubbers",
                        "Cormorant"),
                    salesCubeSchemaReader)));
        assertFalse(
            tuppleListContains(
                tuples,
                member(
                    Id.Segment.toList(
                        "Product", "All Products", "Non-Consumable",
                        "Household", "Kitchen Products", "Pot Scrubbers"),
                    salesCubeSchemaReader)));
        assertFalse(
            tuppleListContains(
                tuples,
                member(
                    Id.Segment.toList(
                        "Product", "All Products", "Non-Consumable",
                        "Household", "Kitchen Products", "Pots and Pans",
                        "Cormorant"),
                    salesCubeSchemaReader)));
        assertTrue(
            tuppleListContains(
                tuples,
                member(
                    Id.Segment.toList(
                        "Product", "All Products", "Non-Consumable",
                        "Household", "Kitchen Products", "Pots and Pans"),
                    salesCubeSchemaReader)));
        assertEquals(4, tuples.size());
    }
View Full Code Here

Examples of mondrian.calc.TupleList

                    salesCubeSchemaReader)));
        assertEquals(4, tuples.size());
    }

    public void testOptimizeChildrenForTuplesWithLength3() {
        TupleList memberList =
            CrossJoinFunDef.mutableCrossJoin(
                genderMembersIncludingAll(
                    false, salesCubeSchemaReader, salesCube),
                productMembersPotScrubbersPotsAndPans(salesCubeSchemaReader));
        memberList =
            CrossJoinFunDef.mutableCrossJoin(
                memberList, storeMembersCAAndOR(salesCubeSchemaReader));
        TupleList tuples = optimizeChildren(memberList);
        assertFalse(
            tuppleListContains(
                tuples,
                member(
                    Id.Segment.toList(
                        "Store", "All Stores", "USA", "OR", "Portland"),
                    salesCubeSchemaReader)));
        assertTrue(
            tuppleListContains(
                tuples,
                member(
                    Id.Segment.toList("Store", "All Stores", "USA", "OR"),
                    salesCubeSchemaReader)));
        assertEquals(16, tuples.size());
    }
View Full Code Here

Examples of mondrian.calc.TupleList

                    salesCubeSchemaReader)));
        assertEquals(16, tuples.size());
    }

    public void testOptimizeChildrenWhenTuplesAreFormedWithDifferentLevels() {
        TupleList memberList =
            CrossJoinFunDef.mutableCrossJoin(
                genderMembersIncludingAll(
                    false, salesCubeSchemaReader, salesCube),
                productMembersPotScrubbersPotsAndPans(salesCubeSchemaReader));
        TupleList tuples = optimizeChildren(memberList);
        assertEquals(4, tuples.size());

        assertFalse(
            tuppleListContains(
                tuples,
                member(
View Full Code Here

Examples of mondrian.calc.TupleList

                        "Cormorant"),
                salesCubeSchemaReader)));
    }

    public void testWhetherCJOfChildren() {
        TupleList memberList =
            CrossJoinFunDef.mutableCrossJoin(
                genderMembersIncludingAll(
                    false, salesCubeSchemaReader, salesCube),
                storeMembersUsaAndCanada(
                    false, salesCubeSchemaReader, salesCube));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.