Package mondrian.test
Class ParentChildHierarchyTest
- java.lang.Object
-
- TestCase
-
- mondrian.test.FoodMartTestCase
-
- mondrian.test.ParentChildHierarchyTest
-
public class ParentChildHierarchyTest extends FoodMartTestCase
Tests for parent-child hierarchies.- Since:
- Mar 6, 2003
- Author:
- jhyde
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class mondrian.test.FoodMartTestCase
FoodMartTestCase.QueryAndResult
-
-
Field Summary
-
Fields inherited from class mondrian.test.FoodMartTestCase
propSaver
-
-
Constructor Summary
Constructors Constructor Description ParentChildHierarchyTest(String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
_testNonClosureParentChildHierarchy()
void
testAll()
void
testAllMembersParent()
void
testBridgeTable()
void
testBugMondrian168()
void
testChildrenOfAll()
void
testClosureTableInVirtualCube()
void
testClosureVsNoClosure()
Verifies the fix for MONDRIAN-519, a class cast exception when using non-closure parent child hierarchies.void
testDistinctAll()
void
testDistinctAllExplicitClosure()
Verifies that COUNT DISTINCT works against the explict closure of the parent/child hierarchy.void
testDistinctChildrenOfAll()
void
testDistinctChildrenOfAllExplicitClosure()
void
testDistinctSubtree()
void
testDistinctSubtreeExplicitClosure()
void
testDotMembersNoClosure()
void
testGenuineCycle()
void
testHierarchyFalseCycle()
The recursion cyclicity check kicks in when the recursion depth reachs the number of dimensions in the cube.void
testLeaf()
void
testLevelMembers()
void
testOneAboveLeaf()
void
testParentChildDescendantsLeavesBottom()
Script That Uses the LEAVES Flag to Return the Bottom 10 Dimension Members, from here.void
testParentChildDescendantsLeavesTop()
Script from here.void
testParentChildDrillThrough()
void
testParentChildDrillThroughWithContext()
void
testParentChildOrdinal()
Tests that a parent-child hierarchy is sorted correctly if the "ordinalColumn" attribute is included in its definition.void
testPCCacheKeyBug()
Fix for MONDRIAN-1225void
testSchemaReaderLevelMembers()
void
testSharedClosureParentChildHierarchy()
void
testSnowflakeClosure()
Tests snow flake closure combination.-
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
-
ParentChildHierarchyTest
public ParentChildHierarchyTest(String name)
-
-
Method Detail
-
testDotMembersNoClosure
public void testDotMembersNoClosure()
-
testSnowflakeClosure
public void testSnowflakeClosure()
Tests snow flake closure combination.Test case for MONDRIAN-266, "Closure tables do not work in a Snowflake Dimension".
-
testSharedClosureParentChildHierarchy
public void testSharedClosureParentChildHierarchy()
-
_testNonClosureParentChildHierarchy
public void _testNonClosureParentChildHierarchy()
-
testAll
public void testAll()
-
testChildrenOfAll
public void testChildrenOfAll()
-
testDistinctAll
public void testDistinctAll()
-
testDistinctChildrenOfAll
public void testDistinctChildrenOfAll()
-
testDistinctSubtree
public void testDistinctSubtree()
-
testDistinctAllExplicitClosure
public void testDistinctAllExplicitClosure()
Verifies that COUNT DISTINCT works against the explict closure of the parent/child hierarchy. (Repeats the last 4 tests.)
-
testDistinctChildrenOfAllExplicitClosure
public void testDistinctChildrenOfAllExplicitClosure()
-
testDistinctSubtreeExplicitClosure
public void testDistinctSubtreeExplicitClosure()
-
testLeaf
public void testLeaf()
-
testOneAboveLeaf
public void testOneAboveLeaf()
-
testParentChildDescendantsLeavesBottom
public void testParentChildDescendantsLeavesBottom()
Script That Uses the LEAVES Flag to Return the Bottom 10 Dimension Members, from here.
-
testParentChildDescendantsLeavesTop
public void testParentChildDescendantsLeavesTop()
Script from here.
-
testAllMembersParent
public void testAllMembersParent()
-
testHierarchyFalseCycle
public void testHierarchyFalseCycle()
The recursion cyclicity check kicks in when the recursion depth reachs the number of dimensions in the cube. So create a cube with fewer dimensions (3) than the depth of the emp dimension (6).
-
testGenuineCycle
public void testGenuineCycle()
-
testParentChildDrillThrough
public void testParentChildDrillThrough()
-
testParentChildDrillThroughWithContext
public void testParentChildDrillThroughWithContext()
-
testBugMondrian168
public void testBugMondrian168()
-
testParentChildOrdinal
public void testParentChildOrdinal()
Tests that a parent-child hierarchy is sorted correctly if the "ordinalColumn" attribute is included in its definition. Testcase for MONDRIAN-203, "Sorting of Parent/Child Hierarchy is wrong".
-
testLevelMembers
public void testLevelMembers()
-
testClosureTableInVirtualCube
public void testClosureTableInVirtualCube()
-
testClosureVsNoClosure
public void testClosureVsNoClosure()
Verifies the fix for MONDRIAN-519, a class cast exception when using non-closure parent child hierarchies.
-
testSchemaReaderLevelMembers
public void testSchemaReaderLevelMembers()
-
testBridgeTable
public void testBridgeTable()
-
testPCCacheKeyBug
public void testPCCacheKeyBug() throws Exception
Fix for MONDRIAN-1225When nativizing a set which contained a PC hierarchy, the SqlTupleReader would ask the cache for the parent member of the member it was populating, but the members are only put in cache at the second phase of the tuple computation, once all the members have been populated from SQL. Now, the SqlTupleReader keeps an intermediate key->member map so it can construct PC hierarchies correctly. This map gets picked up by the GC as soon as the SQL result set reaches its end and the tuple reader is closed, so there are no added cost to this.
- Throws:
Exception
-
-