Skip to content

Commit

Permalink
MONDRIAN: sql patterns are different if agg tables
Browse files Browse the repository at this point in the history
used. Disable tests that do not need to be run with aggregate tables.

[git-p4: depot-paths = "//open/mondrian/": change = 10264]
  • Loading branch information
Rushan Chen committed Dec 7, 2007
1 parent 441ec79 commit ed13b90
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion testsrc/main/mondrian/rolap/sql/SqlQueryTest.java
Expand Up @@ -103,6 +103,13 @@ public void testToStringForSingleGroupingSetSql() {
}

public void testPredicatesAreOptimizedWhenPropertyIsTrue() {
if (prop.ReadAggregates.get() && prop.UseAggregates.get()) {
// Sql pattner will be different if using aggregate tables.
// This test cover predicate generation so it's sufficient to
// only check sql pattern when aggregate tables are not used.
return;
}

String mdx =
"select {[Time].[1997].[Q1],[Time].[1997].[Q2]," +
"[Time].[1997].[Q3]} on 0 from sales";
Expand Down Expand Up @@ -137,7 +144,14 @@ public void testPredicatesAreOptimizedWhenPropertyIsTrue() {
assertSqlEqualsOptimzePredicates(true, mdx, sqlPatterns);
}

public void testPredicatesAreNotOptimizedWhenPropertyIsFalse() {
public void testPredicatesAreNotOptimizedWhenPropertyIsFalse() {
if (prop.ReadAggregates.get() && prop.UseAggregates.get()) {
// Sql pattner will be different if using aggregate tables.
// This test cover predicate generation so it's sufficient to
// only check sql pattern when aggregate tables are not used.
return;
}

String mdx =
"select {[Time].[1997].[Q1],[Time].[1997].[Q2]," +
"[Time].[1997].[Q3]} on 0 from sales";
Expand Down Expand Up @@ -174,6 +188,13 @@ public void testPredicatesAreNotOptimizedWhenPropertyIsFalse() {
}

public void testPredicatesAreOptimizedWhenAllTheMembersAreIncluded() {
if (prop.ReadAggregates.get() && prop.UseAggregates.get()) {
// Sql pattner will be different if using aggregate tables.
// This test cover predicate generation so it's sufficient to
// only check sql pattern when aggregate tables are not used.
return;
}

String mdx = "select {[Time].[1997].[Q1],[Time].[1997].[Q2]," +
"[Time].[1997].[Q3],[Time].[1997].[Q4]} on 0 from sales";

Expand Down

0 comments on commit ed13b90

Please sign in to comment.