use of mondrian.olap.Axis in project mondrian by pentaho.
the class BasicQueryTest method testNonEmptyNonEmptyCrossJoin4.
public void testNonEmptyNonEmptyCrossJoin4() {
TestContext.instance().flushSchemaCache();
Result result = executeQuery("select {[Education Level].[All Education Levels].[Graduate Degree]} on columns,\n" + " Non Empty NonEmptyCrossJoin(\n" + " {[Store Type].[Store Type].members},\n" + " {[Promotions].[Promotion Name].members})\n" + " on rows\n" + "from Sales\n" + "where ([Customers].[All Customers].[USA].[WA].[Anacortes])\n");
Axis a = result.getAxes()[1];
assertEquals(1, a.getPositions().size());
}
use of mondrian.olap.Axis in project mondrian by pentaho.
the class BasicQueryTest method testNonEmptyNonEmptyCrossJoin1.
/**
* NonEmptyCrossJoin() is not the same as NON EMPTY CrossJoin()
* because it's evaluated independently of the other axes.
* (see http://blogs.msdn.com/bi_systems/articles/162841.aspx)
*/
public void testNonEmptyNonEmptyCrossJoin1() {
TestContext.instance().flushSchemaCache();
Result result = executeQuery("select {[Education Level].[All Education Levels].[Graduate Degree]} on columns,\n" + " CrossJoin(\n" + " {[Store Type].[Store Type].members},\n" + " {[Promotions].[Promotion Name].members})\n" + " on rows\n" + "from Sales\n" + "where ([Customers].[All Customers].[USA].[WA].[Anacortes])\n");
Axis a = result.getAxes()[1];
assertEquals(306, a.getPositions().size());
}
use of mondrian.olap.Axis in project mondrian by pentaho.
the class BasicQueryTest method _testProduct2.
public void _testProduct2() {
final Axis axis = getTestContext().executeAxis("{[Product2].members}");
System.out.println(TestContext.toString(axis.getPositions()));
}
use of mondrian.olap.Axis in project mondrian by pentaho.
the class BasicQueryTest method testNonEmptyNonEmptyCrossJoin2.
public void testNonEmptyNonEmptyCrossJoin2() {
TestContext.instance().flushSchemaCache();
Result result = executeQuery("select {[Education Level].[All Education Levels].[Graduate Degree]} on columns,\n" + " NonEmptyCrossJoin(\n" + " {[Store Type].[Store Type].members},\n" + " {[Promotions].[Promotion Name].members})\n" + " on rows\n" + "from Sales\n" + "where ([Customers].[All Customers].[USA].[WA].[Anacortes])\n");
Axis a = result.getAxes()[1];
assertEquals(10, a.getPositions().size());
}
use of mondrian.olap.Axis in project mondrian by pentaho.
the class BasicQueryTest method testFilteredCrossJoin.
/**
* This resulted in {@link OutOfMemoryError} when the
* BatchingCellReader did not know the values for the tuples that
* were used in filters.
*/
public void testFilteredCrossJoin() {
TestContext.instance().flushSchemaCache();
Result result = executeQuery("select {[Measures].[Store Sales]} on columns,\n" + " NON EMPTY Crossjoin(\n" + " Filter([Customers].[Name].Members,\n" + " (([Measures].[Store Sales],\n" + " [Store].[All Stores].[USA].[CA].[San Francisco].[Store 14],\n" + " [Time].[1997].[Q1].[1]) > 5.0)),\n" + " Filter([Product].[Product Name].Members,\n" + " (([Measures].[Store Sales],\n" + " [Store].[All Stores].[USA].[CA].[San Francisco].[Store 14],\n" + " [Time].[1997].[Q1].[1]) > 5.0))\n" + " ) ON rows\n" + "from [Sales]\n" + "where (\n" + " [Store].[All Stores].[USA].[CA].[San Francisco].[Store 14],\n" + " [Time].[1997].[Q1].[1]\n" + ")\n");
// ok if no OutOfMemoryError occurs
Axis a = result.getAxes()[1];
assertEquals(12, a.getPositions().size());
}
Aggregations