Package mondrian.rolap
Class FilterTest
- java.lang.Object
-
- TestCase
-
- mondrian.test.FoodMartTestCase
-
- mondrian.rolap.BatchTestCase
-
- mondrian.rolap.FilterTest
-
public class FilterTest extends BatchTestCase
Tests for Filter and native Filters.- Since:
- April 28, 2009
- Author:
- Rushan Chen
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class mondrian.rolap.BatchTestCase
BatchTestCase.Bomb, BatchTestCase.CellRequestConstraint, BatchTestCase.TestCase, BatchTestCase.TestListener
-
-
Field Summary
-
Fields inherited from class mondrian.rolap.BatchTestCase
cubeNameSales, fieldGender, fieldProductDepartment, fieldProductFamily, fieldValueProductDepartment, fieldValuesGender, fieldValuesProductFamily, fieldValuesYear, fieldYear, measureUnitSales, tableCustomer, tableProductClass, tableTime
-
Fields inherited from class mondrian.test.FoodMartTestCase
propSaver
-
-
Constructor Summary
Constructors Constructor Description FilterTest()FilterTest(String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidsetUp()voidtestBug779()Tests the bug MONDRIAN-779.voidtestBugMondrian706()voidtestCachedNativeSetUsingFilters()voidtestCmNativeFilter()Executes a Filter() whose condition contains a calculated member.voidtestInFilterAND()voidtestInFilterNonNative()Here the filter is above (rather than as inputs to) the NECJ.voidtestInFilterSimple()voidtestIsFilterSimple()voidtestMixedInIsFilters()voidtestMultiValueInWithNullVals()http://jira.pentaho.com/browse/MONDRIAN-1458 When using a multi value IN clause which includes null values against a collapsed field on an aggregate table, the dimension table field was referenced as the column expression, causing sql errors.voidtestNativeFilter()voidtestNativeFilterNonEmpty()Verify that filter with Not IsEmpty(storedMeasure) can be natively evaluated.voidtestNativeFilterWithNullMeasure()voidtestNonNativeFilterWithCalcMember()voidtestNonNativeFilterWithNullMeasure()voidtestNotInFilterExcludeNullMember()Test that if Null member is explicitly excluded, then the native filter SQL should filter out null members.voidtestNotInFilterKeepNullMember()Test that if Null member is not explicitly excluded, then the native filter SQL should not filter out null members.voidtestNotInFilterSimple()voidtestNotInMultiLevelMemberConstraintMixedNullNonNullParent()Test that null members are included when the filter explicitly excludes certain members that contain nulls.voidtestNotInMultiLevelMemberConstraintNonNullParent()Test that null members are included when the filter excludes members that contain multiple levels, but none being null.voidtestNotInMultiLevelMemberConstraintNonNullSameParent()Test that null members are included when the filter excludes members that contain multiple levels, but none being null.voidtestNotInMultiLevelMemberConstraintSingleNullParent()Test that null members are included when the filter explicitly excludes a single member that has a null.voidtestNotIsFilterSimple()voidtestTopCountOverInFilter()-
Methods inherited from class mondrian.rolap.BatchTestCase
assertNative, assertNoQuerySql, assertNotNative, assertQuerySql, assertQuerySql, assertQuerySql, assertQuerySqlOrNot, assertRequestSql, assertRequestSql, checkNative, checkNative, checkNative, checkNotNative, checkNotNative, checkNotNative, clearAndHardenCache, createBatch, createBatch, createRequest, createRequest, createRequest, createRequest, dialectize, executeQuery, getCube, getFoodMartConnection, getGroupingSet, getMeasure, getRegistry, makeConstraintCountryState, makeConstraintProductFamilyDepartment, makeConstraintYearQuarterMonth, mysqlPattern, sqlPattern
-
Methods inherited from class mondrian.test.FoodMartTestCase
allMember, assertAxisReturns, assertAxisThrows, assertBooleanExprReturns, assertExprReturns, assertExprThrows, assertQueriesReturnSimilarResults, assertQueryReturns, assertQueryThrows, assertSize, cubeByName, execute, executeExpr, executeQuery, executeSingletonAxis, genderMembersIncludingAll, getConnection, getDimensionWithName, getTestContext, isDefaultNullMemberRepresentation, isGroupingSetsSupported, member, productMembersPotScrubbersPotsAndPans, storeMembersCAAndOR, storeMembersUsaAndCanada, tearDown, verifySameNativeAndNot, warehouseMembersCanadaMexicoUsa
-
-
-
-
Constructor Detail
-
FilterTest
public FilterTest()
-
FilterTest
public FilterTest(String name)
-
-
Method Detail
-
testInFilterNonNative
public void testInFilterNonNative() throws ExceptionHere the filter is above (rather than as inputs to) the NECJ. These types of filters are currently not natively evaluated.To expand on this case, RolapNativeFilter needs to be improved so it knows how to represent the dimension filter constraint. Currently the FilterConstraint is only used for filters on measures.
- Throws:
Exception
-
testNotInFilterKeepNullMember
public void testNotInFilterKeepNullMember() throws ExceptionTest that if Null member is not explicitly excluded, then the native filter SQL should not filter out null members.- Throws:
Exception
-
testNotInFilterExcludeNullMember
public void testNotInFilterExcludeNullMember() throws ExceptionTest that if Null member is explicitly excluded, then the native filter SQL should filter out null members.- Throws:
Exception
-
testNotInMultiLevelMemberConstraintNonNullParent
public void testNotInMultiLevelMemberConstraintNonNullParent()
Test that null members are included when the filter excludes members that contain multiple levels, but none being null.
-
testNotInMultiLevelMemberConstraintNonNullSameParent
public void testNotInMultiLevelMemberConstraintNonNullSameParent()
Test that null members are included when the filter excludes members that contain multiple levels, but none being null. The members have the same parent.
-
testNotInMultiLevelMemberConstraintMixedNullNonNullParent
public void testNotInMultiLevelMemberConstraintMixedNullNonNullParent()
Test that null members are included when the filter explicitly excludes certain members that contain nulls. The members span multiple levels.
-
testNotInMultiLevelMemberConstraintSingleNullParent
public void testNotInMultiLevelMemberConstraintSingleNullParent()
Test that null members are included when the filter explicitly excludes a single member that has a null. The members span multiple levels.
-
testCachedNativeSetUsingFilters
public void testCachedNativeSetUsingFilters() throws Exception- Throws:
Exception
-
testNativeFilter
public void testNativeFilter()
-
testCmNativeFilter
public void testCmNativeFilter()
Executes a Filter() whose condition contains a calculated member.
-
testNonNativeFilterWithNullMeasure
public void testNonNativeFilterWithNullMeasure()
-
testNativeFilterWithNullMeasure
public void testNativeFilterWithNullMeasure()
-
testNonNativeFilterWithCalcMember
public void testNonNativeFilterWithCalcMember()
-
testNativeFilterNonEmpty
public void testNativeFilterNonEmpty()
Verify that filter with Not IsEmpty(storedMeasure) can be natively evaluated.
-
testBugMondrian706
public void testBugMondrian706()
-
testBug779
public void testBug779()
Tests the bug MONDRIAN-779. TheMemberListCrossJoinArgwas not considering the 'exclude' attribute in its hash code. This resulted in two filters being chained within two different named sets to register a cache element with the same key, even though they were the different because of the added "NOT" keyword.
-
testMultiValueInWithNullVals
public void testMultiValueInWithNullVals()
http://jira.pentaho.com/browse/MONDRIAN-1458 When using a multi value IN clause which includes null values against a collapsed field on an aggregate table, the dimension table field was referenced as the column expression, causing sql errors.
-
-