mondrian.rolap
Class NonEmptyTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by mondrian.test.FoodMartTestCase
              extended by mondrian.rolap.BatchTestCase
                  extended by mondrian.rolap.NonEmptyTest
All Implemented Interfaces:
junit.framework.Test

public class NonEmptyTest
extends BatchTestCase

Tests for NON EMPTY Optimization, includes SqlConstraint type hierarchy and RolapNative classes.

Since:
Nov 21, 2005
Author:
av

Nested Class Summary
 
Nested classes/interfaces inherited from class mondrian.rolap.BatchTestCase
BatchTestCase.Bomb, BatchTestCase.CellRequestConstraint, BatchTestCase.TestCase, BatchTestCase.TestListener
 
Field Summary
(package private)  TestContext localTestContext
           
(package private)  SqlConstraintFactory scf
           
 
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
NonEmptyTest()
           
NonEmptyTest(String name)
           
 
Method Summary
(package private)  void clearAndHardenCache(MemberCacheHelper helper)
           
(package private)  RolapEvaluator getEvaluator(Result res, int[] pos)
           
(package private)  SmartMemberReader getSharedSmartMemberReader(Connection con, String hierName)
           
(package private)  SmartMemberReader getSharedSmartMemberReader(String hierName)
           
(package private)  SmartMemberReader getSmartMemberReader(Connection con, String hierName)
           
(package private)  SmartMemberReader getSmartMemberReader(String hierName)
           
 TestContext getTestContext()
          Returns the test context.
 void setTestContext(TestContext testContext)
           
protected  void setUp()
           
protected  void tearDown()
           
 void testAllLevelMembers()
          getMembersInLevel where Level = (All)
 void testAllMembersNECJ1()
          Verify that the presence of All member in all the inputs disables native evaluation.
 void testAllMembersNECJ2()
          Verify that the native evaluation is possible if one input does not contain the All member.
 void testAnalyzerPerformanceIssue()
          Test case for an issue where mondrian failed to use native evaluation for evaluating crossjoin.
 void testBug1412384()
           
 void testBug1515302()
           
 void testBug1791609NonEmptyCrossJoinEliminatesCalcMember()
          Tests bug 1791609, "CrossJoin non empty optimizer eliminates calculated member".
 void testBug1961163()
           
 void testBugCantRestrictSlicerToCalcMember()
           
 void testBugMondrian321()
          Test case for MONDRIAN-321, "CrossJoin has no nulls when EnableNativeNonEmpty=true".
 void testBugMondrian412()
          Test case for MONDRIAN-412, "NON EMPTY and Filter() breaking aggregate calculations".
 void testBugMondrian584EnumOrder()
           
 void testBugMondrian897DoubleNamedSetDefinitions()
          Test case for MONDRIAN-897, "ClassCastException in CrossJoinArgFactory.allArgsCheapToExpand when defining a NamedSet as another NamedSet".
 void testCalcMemberWithNonEmptyCrossJoin()
          Make sure that the Crossjoin in [Measures].[CustomerCount] is not evaluated in NON EMPTY context.
 void testCalculatedDefaultMeasureOnVirtualCubeNoThrowException()
          Before the fix this test would throw an IndexOutOfBounds exception in SqlConstraintUtils.removeDefaultMembers.
 void testCalculatedSlicerMember()
           
 void testCjChildrenChildren()
           
 void testCjChildrenMembers()
           
 void testCjDescendantsEnum()
           
 void testCjDescendantsEnumAll()
          enum sets {} containing members from different levels can not be computed natively currently.
 void testCjDescendantsEnumAllOnly()
          enum sets {} containing ALL
 void testCjDescendantsMembers()
           
 void testCjEnumCalcMembers()
           
 void testCjEnumCalcMembersBug()
           
 void testCjEnumChildren()
           
 void testCjEnumDifferentLevelsChildren()
          {} contains members from different levels, this can not be handled by the current native crossjoin.
 void testCjEnumEmptyCalcMembers()
           
 void testCjEnumEnum()
          use SQL even when all members are known
 void testCjEnumWithHideIfBlankLeaf()
           
 void testCjMembersChildren()
           
 void testCjMembersDescendants()
           
 void testCjMembersDescendantsWithNumericArgument()
           
 void testCjMembersMembers()
           
 void testCjMembersMembersMembers()
           
 void testCjMembersWithHideIfBlankLeaf()
           
 void testCjMembersWithHideIfBlankLeafAndNoAll()
           
 void testCjMembersWithHideIfBlankNameAncestor()
           
 void testCjMembersWithHideIfParentsNameAncestor()
           
 void testCjMembersWithHideIfParentsNameLeaf()
           
 void testCjNullInEnum()
          Set containing only null member should not prevent usage of native.
 void testCjUnionEnumCalcMembers()
           
 void testCmInSlicer()
          Calc member in slicer cannot be executed natively.
 void testCmInTopCount()
          Calc Member in TopCount: this topcount can not be calculated native because its set contains calculated members.
 void testCmNativeTopCount()
          Checks that TopCount is executed natively with calculated member.
 void testConstrainedMeasureGetsOptimized()
           
 void testContextAtAllWorksWithConstraint()
           
 void testCrossjoin()
          When a member is expanded in JPivot with mulitple hierarchies visible it generates a CrossJoin({[member from left hierarchy]}, [member to expand].Children)
 void testCrossJoinEvaluatorContext1()
           
 void testCrossJoinEvaluatorContext2()
           
 void testCrossJoinMultiInExprAllMember()
           
 void testCrossJoinNamedSets1()
           
 void testCrossJoinNamedSets2()
           
 void testCrossJoinSetWithCrossProdMembers()
           
 void testCrossJoinSetWithDifferentParents()
           
 void testCrossJoinSetWithSameParent()
           
 void testCrossJoinSetWithUniqueLevel()
           
 void testCrossjoinWithOneDimensionThatDoesNotJoinToBothBaseCubes()
           
 void testCrossjoinWithTwoDimensionsJoiningToOppositeBaseCubes()
           
 void testDependentSlicerMemberNative()
           
 void testDependentSlicerMemberNonNative()
           
 void testDimensionMembers()
          Tests that .Members exploits the same optimization as .Members.
 void testEnumLowMaxConstraints()
          Verify that native MemberLists inputs are subject to SQL constriant limitation.
 void testExpandAllMembersInAllInputs()
          Verify that the presence of All member in all the inputs disables native evaluation, even when ExpandNonNative is true.
 void testExpandAllNonNativeInputs()
          Verifies that CrossJoins with two non native inputs can be natively evaluated.
 void testExpandCalcMemberInputNECJ()
          Check that if both inputs to NECJ are either AllMember(currentMember, defaultMember are also AllMember) or Calcculated member native CJ is not used.
 void testExpandCalcMembers()
          Native evaluation is no longer possible after the fix to testCjEnumCalcMembersBug() test.
 void testExpandCalcMembersInAllInputs()
          Verifies that the presence of calculated member in all the inputs disables native evaluation, even when ExpandNonNative is true.
 void testExpandDifferentLevels()
          Verify that native evaluation is not enabled if expanded member list will contain members from different levels, even if ExpandNonNative is set.
 void testExpandLowMaxConstraints()
          Verify that a low value for maxConstraints disables native evaluation, even when ExpandNonNative is true.
 void testExpandNestedNonNativeInputs()
          Verify that evaluation is native for expressions with nested non native inputs that preduce MemberList results.
 void testExpandNonNativeResourceLimitFailure()
          Check that the ExpandNonNative does not create Joins with input lists containing large number of members.
 void testExpandNonNativeWithEnableNativeCrossJoin()
          Test case for MONDRIAN-734, "Exception thrown when creating a "New Analysis View" with JPivot".
 void testExpandOneNonNativeInput()
          Verifies that CrossJoins with one non native inputs can be natively evaluated.
 void testExpandTupleInputs1()
          Verify that native evaluation is turned off for tuple inputs, even if ExpandNonNative is set.
 void testExpandTupleInputs2()
          Verify that native evaluation is turned off for tuple inputs, even if ExpandNonNative is set.
 void testExpandWithOneEmptyInput()
          Verify that native evaluation is on when ExpendNonNative is set, even if the input list is empty.
 void testExpandWithTwoEmptyInputs()
           
 void testFilterChildlessSnowflakeMembers()
           
 void testFilterChildlessSnowflakeMembers2()
           
 void testIndependentSlicerMemberNative()
           
 void testIndependentSlicerMemberNonNative()
           
 void testLeafMembersOfParentChildDimensionAreNativelyEvaluated()
           
 void testLevelMembers()
           
 void testLevelMembersWillConstrainUsingArgsFromAllAxes()
           
 void testLevelMembersWithoutNonEmpty()
           
 void testLookupMember()
          When looking for [Month] Mondrian generates SQL that tries to find 'Month' as a member of the time dimension.
 void testLookupMember2()
          SQL Optimization must be turned off in ragged hierarchies.
 void testLookupMemberCache()
          when Mondrian parses a string like "[Store].[All Stores].[USA].[CA].[San Francisco]" it shall not lookup additional members.
 void testMeasureAndAggregateInSlicer()
           
 void testMeasureConstraintsInACrossjoinHaveCorrectResults()
           
 void testMeasureInSlicer()
           
 void testMemberChildrenNameCol()
          Testcase for bug 1379068, which causes no children of [Time].[1997].[Q2] to be found, because it incorrectly constrains on the level's key column rather than name column.
 void testMemberChildrenNoWhere()
          Tests non empty children of All member w/o WHERE clause
 void testMemberChildrenOfAllMember()
          Tests non empty children of All member
 void testMemberChildrenOfRolapMember()
          Tests non empty children of rolap member
 void testMondrian1133()
          Test case for MONDRIAN-1133
 void testMondrian1133WithAggs()
          Test case for MONDRIAN-1133
 void testMultiLevelMemberConstraintMixedNullNonNullParent()
          Check that multi-level member list generates compact form of SQL where clause: (1) Use IN list if possible(not possible if there are null values because NULLs in IN lists do not match) (2) Group members sharing the same parent, including parents with NULLs.
 void testMultiLevelMemberConstraintNonNullParent()
          Checks that multi-level member list generates compact form of SQL where clause: (1) Use IN list if possible (2) Group members sharing the same parent (3) Only need to compare up to the first unique parent level.
 void testMultiLevelMemberConstraintNullParent()
          Checks that multi-level member list generates compact form of SQL where clause: (1) Use IN list if possible(not possible if there are null values because NULLs in IN lists do not match) (2) Group members sharing the same parent, including parents with NULLs.
 void testMultiLevelMemberConstraintWithMixedNullNonNullChild()
          Check that multi-level member list generates compact form of SQL where clause: (1) Use IN list if possible(not possible if there are null values because NULLs in IN lists do not match) (2) Group members sharing the same parent (3) Only need to compare up to the first unique parent level.
 void testNativeCJWithRedundantSetBraces()
          verifies that redundant set braces do not prevent native evaluation for example, {[Store].[Store Name].members} and {{[Store Type].[Store Type].members}}
 void testNativeCrossjoinWillConstrainUsingArgsFromAllAxes()
           
 void testNativeCrossjoinWillExpandFirstLastChild()
           
 void testNativeCrossjoinWillExpandLagInNamedSet()
           
 void testNativeTopCount()
          Checks that TopCount is executed natively unless disabled.
 void testNativeWithOverriddenNullMemberRepAndNullConstraint()
           
 void testNestedMeasureConstraintsGetOptimized()
           
 void testNonEmptyCJWithMultiPositionSlicer()
          Test case for MONDRIAN-695, "Unexpected data set may returned when MDX slicer contains multiple dimensions".
 void testNonEmptyCrossJoinList()
          Non Empty CrossJoin (A,B) gets turned into CrossJoin (Non Empty(A), Non Empty(B)).
 void testNonEmptyDescendants()
          Ensures that NON EMPTY Descendants is optimized.
 void testNonEmptyLevelMembers()
          Test that executes <Level>.Members and applies a non-empty constraint.
 void testNonEmptyOnNonJoiningValidMeasure()
           
 void testNonEmptyResults()
           
 void testNonEmptyUnionQuery()
           
 void testNonEmptyWithCalcMeasure()
          Test for bug #1696772 Modified which calculations are tested for non native, non empty joins
 void testNonEmptyWithWeirdDefaultMember()
          Tests the behavior if you have NON EMPTY on both axes, and the default member of a hierarchy is not 'all' or the first child.
 void testNonEmpyOnVirtualCubeWithNonJoiningDimension()
           
 void testNonLeafMembersOfPCDimensionAreNotNativelyEvaluated()
           
 void testNonUniformConstraintsAreNotUsedForOptimization()
           
 void testNonUniformNestedMeasureConstraintsGetOptimized()
           
 void testNotNativeVirtualCubeCrossJoin1()
           
 void testNotNativeVirtualCubeCrossJoin2()
           
 void testNotNativeVirtualCubeCrossJoinCalculatedMember()
           
 void testNotNativeVirtualCubeCrossJoinUnsupported()
           
 void testResultIsModifyableCopy()
          checks that crossjoin returns a modifiable copy from cache because its modified during sort
 void testStrMeasure()
           
 void testTopCountCacheKeyMustIncludeCount()
           
 void testTopCountWithCalcMemberInSlicer()
           
 void testVCNativeCJWithIsEmptyOnMeasure()
           
 void testVCNativeCJWithTopPercent()
           
 void testVCOrdinalExpression()
           
 void testVirtualCube()
          Must not use native sql optimization because it chooses the wrong RolapStar in SqlContextConstraint/SqlConstraintUtils.
 void testVirtualCubeCrossJoin()
           
 void testVirtualCubeCrossJoinCalculatedMember1()
           
 void testVirtualCubeCrossJoinCalculatedMember2()
           
 void testVirtualCubeMembers()
           
 void testVirtualCubeNonEmptyCrossJoin()
           
 void testVirtualCubeNonEmptyCrossJoin3Args()
           
 
Methods inherited from class mondrian.rolap.BatchTestCase
assertNative, assertNoQuerySql, assertNotNative, assertQuerySql, assertQuerySql, assertQuerySql, assertQuerySqlOrNot, assertRequestSql, assertRequestSql, checkNative, checkNative, checkNative, checkNotNative, checkNotNative, checkNotNative, createBatch, createBatch, createRequest, createRequest, createRequest, createRequest, dialectize, executeQuery, getCube, getFoodMartConnection, getGroupingSet, getMeasure, getRegistry, makeConstraintCountryState, makeConstraintProductFamilyDepartment, makeConstraintYearQuarterMonth
 
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, isDefaultNullMemberRepresentation, isGroupingSetsSupported, member, productMembersPotScrubbersPotsAndPans, storeMembersCAAndOR, storeMembersUsaAndCanada, warehouseMembersCanadaMexicoUsa
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

scf

SqlConstraintFactory scf

localTestContext

TestContext localTestContext
Constructor Detail

NonEmptyTest

public NonEmptyTest()

NonEmptyTest

public NonEmptyTest(String name)
Method Detail

setUp

protected void setUp()
              throws Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
Exception

tearDown

protected void tearDown()
                 throws Exception
Overrides:
tearDown in class FoodMartTestCase
Throws:
Exception

getTestContext

public TestContext getTestContext()
Description copied from class: FoodMartTestCase
Returns the test context. Override this method if you wish to use a different source for your FoodMart connection.

Overrides:
getTestContext in class FoodMartTestCase

setTestContext

public void setTestContext(TestContext testContext)

testBugMondrian584EnumOrder

public void testBugMondrian584EnumOrder()

testBugCantRestrictSlicerToCalcMember

public void testBugCantRestrictSlicerToCalcMember()
                                           throws Exception
Throws:
Exception

testAnalyzerPerformanceIssue

public void testAnalyzerPerformanceIssue()
Test case for an issue where mondrian failed to use native evaluation for evaluating crossjoin. With the issue, performance is poor because mondrian is doing crossjoins in memory; and the test case throws because the result limit is exceeded.


testBug1961163

public void testBug1961163()
                    throws Exception
Throws:
Exception

testTopCountWithCalcMemberInSlicer

public void testTopCountWithCalcMemberInSlicer()

testTopCountCacheKeyMustIncludeCount

public void testTopCountCacheKeyMustIncludeCount()

testStrMeasure

public void testStrMeasure()

testBug1515302

public void testBug1515302()

testVirtualCube

public void testVirtualCube()
Must not use native sql optimization because it chooses the wrong RolapStar in SqlContextConstraint/SqlConstraintUtils. Test ensures that no exception is thrown.


testVirtualCubeMembers

public void testVirtualCubeMembers()
                            throws Exception
Throws:
Exception

testNativeCJWithRedundantSetBraces

public void testNativeCJWithRedundantSetBraces()
verifies that redundant set braces do not prevent native evaluation for example, {[Store].[Store Name].members} and {{[Store Type].[Store Type].members}}


testExpandAllNonNativeInputs

public void testExpandAllNonNativeInputs()
Verifies that CrossJoins with two non native inputs can be natively evaluated.


testExpandOneNonNativeInput

public void testExpandOneNonNativeInput()
Verifies that CrossJoins with one non native inputs can be natively evaluated.


testExpandNonNativeResourceLimitFailure

public void testExpandNonNativeResourceLimitFailure()
Check that the ExpandNonNative does not create Joins with input lists containing large number of members.


testExpandAllMembersInAllInputs

public void testExpandAllMembersInAllInputs()
Verify that the presence of All member in all the inputs disables native evaluation, even when ExpandNonNative is true.


testExpandCalcMembersInAllInputs

public void testExpandCalcMembersInAllInputs()
Verifies that the presence of calculated member in all the inputs disables native evaluation, even when ExpandNonNative is true.


testExpandCalcMemberInputNECJ

public void testExpandCalcMemberInputNECJ()
Check that if both inputs to NECJ are either AllMember(currentMember, defaultMember are also AllMember) or Calcculated member native CJ is not used.


testExpandCalcMembers

public void testExpandCalcMembers()
Native evaluation is no longer possible after the fix to testCjEnumCalcMembersBug() test.


testExpandNestedNonNativeInputs

public void testExpandNestedNonNativeInputs()
Verify that evaluation is native for expressions with nested non native inputs that preduce MemberList results.


testExpandLowMaxConstraints

public void testExpandLowMaxConstraints()
Verify that a low value for maxConstraints disables native evaluation, even when ExpandNonNative is true.


testExpandDifferentLevels

public void testExpandDifferentLevels()
Verify that native evaluation is not enabled if expanded member list will contain members from different levels, even if ExpandNonNative is set.


testExpandTupleInputs1

public void testExpandTupleInputs1()
Verify that native evaluation is turned off for tuple inputs, even if ExpandNonNative is set.


testExpandTupleInputs2

public void testExpandTupleInputs2()
Verify that native evaluation is turned off for tuple inputs, even if ExpandNonNative is set.


testExpandWithOneEmptyInput

public void testExpandWithOneEmptyInput()
Verify that native evaluation is on when ExpendNonNative is set, even if the input list is empty.


testExpandWithTwoEmptyInputs

public void testExpandWithTwoEmptyInputs()

testEnumLowMaxConstraints

public void testEnumLowMaxConstraints()
Verify that native MemberLists inputs are subject to SQL constriant limitation. If mondrian.rolap.maxConstraints is set too low, native evaluations will be turned off.


testAllMembersNECJ1

public void testAllMembersNECJ1()
Verify that the presence of All member in all the inputs disables native evaluation.


testAllMembersNECJ2

public void testAllMembersNECJ2()
Verify that the native evaluation is possible if one input does not contain the All member.


testAllLevelMembers

public void testAllLevelMembers()
getMembersInLevel where Level = (All)


testCjDescendantsEnumAllOnly

public void testCjDescendantsEnumAllOnly()
enum sets {} containing ALL


testResultIsModifyableCopy

public void testResultIsModifyableCopy()
checks that crossjoin returns a modifiable copy from cache because its modified during sort


testNativeTopCount

public void testNativeTopCount()
Checks that TopCount is executed natively unless disabled.


testCmNativeTopCount

public void testCmNativeTopCount()
Checks that TopCount is executed natively with calculated member.


testMeasureAndAggregateInSlicer

public void testMeasureAndAggregateInSlicer()

testMeasureInSlicer

public void testMeasureInSlicer()

testCmInTopCount

public void testCmInTopCount()
Calc Member in TopCount: this topcount can not be calculated native because its set contains calculated members.


testCmInSlicer

public void testCmInSlicer()
Calc member in slicer cannot be executed natively.


testCjMembersMembersMembers

public void testCjMembersMembersMembers()

testCjMembersWithHideIfBlankLeafAndNoAll

public void testCjMembersWithHideIfBlankLeafAndNoAll()

testCjMembersWithHideIfBlankLeaf

public void testCjMembersWithHideIfBlankLeaf()

testCjMembersWithHideIfParentsNameLeaf

public void testCjMembersWithHideIfParentsNameLeaf()

testCjMembersWithHideIfBlankNameAncestor

public void testCjMembersWithHideIfBlankNameAncestor()

testCjMembersWithHideIfParentsNameAncestor

public void testCjMembersWithHideIfParentsNameAncestor()

testCjEnumWithHideIfBlankLeaf

public void testCjEnumWithHideIfBlankLeaf()

testCjEnumEnum

public void testCjEnumEnum()
use SQL even when all members are known


testCjNullInEnum

public void testCjNullInEnum()
Set containing only null member should not prevent usage of native.


testCjDescendantsEnumAll

public void testCjDescendantsEnumAll()
enum sets {} containing members from different levels can not be computed natively currently.


testCjDescendantsEnum

public void testCjDescendantsEnum()

testCjEnumChildren

public void testCjEnumChildren()

testCjEnumDifferentLevelsChildren

public void testCjEnumDifferentLevelsChildren()
{} contains members from different levels, this can not be handled by the current native crossjoin.


testCjDescendantsMembers

public void testCjDescendantsMembers()

testCjMembersDescendants

public void testCjMembersDescendants()

testCjMembersDescendantsWithNumericArgument

public void testCjMembersDescendantsWithNumericArgument()

testCjChildrenMembers

public void testCjChildrenMembers()

testCjMembersChildren

public void testCjMembersChildren()

testCjMembersMembers

public void testCjMembersMembers()

testCjChildrenChildren

public void testCjChildrenChildren()

testMultiLevelMemberConstraintNonNullParent

public void testMultiLevelMemberConstraintNonNullParent()
Checks that multi-level member list generates compact form of SQL where clause: (1) Use IN list if possible (2) Group members sharing the same parent (3) Only need to compare up to the first unique parent level.


testMultiLevelMemberConstraintNullParent

public void testMultiLevelMemberConstraintNullParent()
Checks that multi-level member list generates compact form of SQL where clause: (1) Use IN list if possible(not possible if there are null values because NULLs in IN lists do not match) (2) Group members sharing the same parent, including parents with NULLs. (3) If parent levels include NULLs, comparision includes any unique level.


testMultiLevelMemberConstraintMixedNullNonNullParent

public void testMultiLevelMemberConstraintMixedNullNonNullParent()
Check that multi-level member list generates compact form of SQL where clause: (1) Use IN list if possible(not possible if there are null values because NULLs in IN lists do not match) (2) Group members sharing the same parent, including parents with NULLs. (3) If parent levels include NULLs, comparision includes any unique level. (4) Can handle predicates correctly if the member list contains both NULL and non NULL parent levels.


testMultiLevelMemberConstraintWithMixedNullNonNullChild

public void testMultiLevelMemberConstraintWithMixedNullNonNullChild()
Check that multi-level member list generates compact form of SQL where clause: (1) Use IN list if possible(not possible if there are null values because NULLs in IN lists do not match) (2) Group members sharing the same parent (3) Only need to compare up to the first unique parent level. (4) Can handle predicates correctly if the member list contains both NULL and non NULL child levels.


testNonEmptyUnionQuery

public void testNonEmptyUnionQuery()

testLookupMemberCache

public void testLookupMemberCache()
when Mondrian parses a string like "[Store].[All Stores].[USA].[CA].[San Francisco]" it shall not lookup additional members.


testLookupMember

public void testLookupMember()
When looking for [Month] Mondrian generates SQL that tries to find 'Month' as a member of the time dimension. This resulted in an SQLException because the year level is numeric and the constant 'Month' in the WHERE condition is not. Its probably a bug that Mondrian does not take into account [Time].[1997] when looking up [Month].


testNonEmptyCrossJoinList

public void testNonEmptyCrossJoinList()
Non Empty CrossJoin (A,B) gets turned into CrossJoin (Non Empty(A), Non Empty(B)). Verify that there is no crash when the length of B could be non-zero length before the non empty and 0 after the non empty.


testLookupMember2

public void testLookupMember2()
SQL Optimization must be turned off in ragged hierarchies.


testCalcMemberWithNonEmptyCrossJoin

public void testCalcMemberWithNonEmptyCrossJoin()
Make sure that the Crossjoin in [Measures].[CustomerCount] is not evaluated in NON EMPTY context.


testLevelMembers

public void testLevelMembers()

testLevelMembersWithoutNonEmpty

public void testLevelMembersWithoutNonEmpty()

testDimensionMembers

public void testDimensionMembers()
Tests that .Members exploits the same optimization as .Members.


testMemberChildrenOfRolapMember

public void testMemberChildrenOfRolapMember()
Tests non empty children of rolap member


testMemberChildrenOfAllMember

public void testMemberChildrenOfAllMember()
Tests non empty children of All member


testMemberChildrenNoWhere

public void testMemberChildrenNoWhere()
Tests non empty children of All member w/o WHERE clause


testMemberChildrenNameCol

public void testMemberChildrenNameCol()
Testcase for bug 1379068, which causes no children of [Time].[1997].[Q2] to be found, because it incorrectly constrains on the level's key column rather than name column.


testCrossjoin

public void testCrossjoin()
When a member is expanded in JPivot with mulitple hierarchies visible it generates a CrossJoin({[member from left hierarchy]}, [member to expand].Children)

This should behave the same as if [member from left hierarchy] was put into the slicer.


testNonEmptyDescendants

public void testNonEmptyDescendants()
Ensures that NON EMPTY Descendants is optimized. Ensures that Descendants as a side effect collects MemberChildren that may be looked up in the cache.


testBug1412384

public void testBug1412384()

testVirtualCubeCrossJoin

public void testVirtualCubeCrossJoin()

testVirtualCubeNonEmptyCrossJoin

public void testVirtualCubeNonEmptyCrossJoin()

testVirtualCubeNonEmptyCrossJoin3Args

public void testVirtualCubeNonEmptyCrossJoin3Args()

testNotNativeVirtualCubeCrossJoin1

public void testNotNativeVirtualCubeCrossJoin1()

testNotNativeVirtualCubeCrossJoin2

public void testNotNativeVirtualCubeCrossJoin2()

testNotNativeVirtualCubeCrossJoinUnsupported

public void testNotNativeVirtualCubeCrossJoinUnsupported()

testVirtualCubeCrossJoinCalculatedMember1

public void testVirtualCubeCrossJoinCalculatedMember1()

testVirtualCubeCrossJoinCalculatedMember2

public void testVirtualCubeCrossJoinCalculatedMember2()

testNotNativeVirtualCubeCrossJoinCalculatedMember

public void testNotNativeVirtualCubeCrossJoinCalculatedMember()

testCjEnumCalcMembers

public void testCjEnumCalcMembers()

testCjEnumCalcMembersBug

public void testCjEnumCalcMembersBug()

testCjEnumEmptyCalcMembers

public void testCjEnumEmptyCalcMembers()

testCjUnionEnumCalcMembers

public void testCjUnionEnumCalcMembers()

testNonEmptyWithWeirdDefaultMember

public void testNonEmptyWithWeirdDefaultMember()
Tests the behavior if you have NON EMPTY on both axes, and the default member of a hierarchy is not 'all' or the first child.


testCrossJoinNamedSets1

public void testCrossJoinNamedSets1()

testCrossJoinNamedSets2

public void testCrossJoinNamedSets2()

testCrossJoinSetWithDifferentParents

public void testCrossJoinSetWithDifferentParents()

testCrossJoinSetWithCrossProdMembers

public void testCrossJoinSetWithCrossProdMembers()

testCrossJoinSetWithSameParent

public void testCrossJoinSetWithSameParent()

testCrossJoinSetWithUniqueLevel

public void testCrossJoinSetWithUniqueLevel()

testCrossJoinMultiInExprAllMember

public void testCrossJoinMultiInExprAllMember()

testCrossJoinEvaluatorContext1

public void testCrossJoinEvaluatorContext1()

testCrossJoinEvaluatorContext2

public void testCrossJoinEvaluatorContext2()

testVCNativeCJWithIsEmptyOnMeasure

public void testVCNativeCJWithIsEmptyOnMeasure()

testVCNativeCJWithTopPercent

public void testVCNativeCJWithTopPercent()

testVCOrdinalExpression

public void testVCOrdinalExpression()

testNonEmptyWithCalcMeasure

public void testNonEmptyWithCalcMeasure()
Test for bug #1696772 Modified which calculations are tested for non native, non empty joins


testCalculatedSlicerMember

public void testCalculatedSlicerMember()

testIndependentSlicerMemberNonNative

public void testIndependentSlicerMemberNonNative()

testIndependentSlicerMemberNative

public void testIndependentSlicerMemberNative()

testDependentSlicerMemberNonNative

public void testDependentSlicerMemberNonNative()

testDependentSlicerMemberNative

public void testDependentSlicerMemberNative()

testBug1791609NonEmptyCrossJoinEliminatesCalcMember

public void testBug1791609NonEmptyCrossJoinEliminatesCalcMember()
Tests bug 1791609, "CrossJoin non empty optimizer eliminates calculated member".


testNonEmptyLevelMembers

public void testNonEmptyLevelMembers()
Test that executes <Level>.Members and applies a non-empty constraint. Must work regardless of whether native is enabled. Testcase for bug 1722959, "NON EMPTY Level.MEMBERS fails if nonempty.enable=false"


testNonEmptyResults

public void testNonEmptyResults()

testBugMondrian412

public void testBugMondrian412()
Test case for MONDRIAN-412, "NON EMPTY and Filter() breaking aggregate calculations".


testNonEmpyOnVirtualCubeWithNonJoiningDimension

public void testNonEmpyOnVirtualCubeWithNonJoiningDimension()

testNonEmptyOnNonJoiningValidMeasure

public void testNonEmptyOnNonJoiningValidMeasure()

testCrossjoinWithTwoDimensionsJoiningToOppositeBaseCubes

public void testCrossjoinWithTwoDimensionsJoiningToOppositeBaseCubes()

testCrossjoinWithOneDimensionThatDoesNotJoinToBothBaseCubes

public void testCrossjoinWithOneDimensionThatDoesNotJoinToBothBaseCubes()

testLeafMembersOfParentChildDimensionAreNativelyEvaluated

public void testLeafMembersOfParentChildDimensionAreNativelyEvaluated()

testNonLeafMembersOfPCDimensionAreNotNativelyEvaluated

public void testNonLeafMembersOfPCDimensionAreNotNativelyEvaluated()

testNativeWithOverriddenNullMemberRepAndNullConstraint

public void testNativeWithOverriddenNullMemberRepAndNullConstraint()

testBugMondrian321

public void testBugMondrian321()
Test case for MONDRIAN-321, "CrossJoin has no nulls when EnableNativeNonEmpty=true".


testNativeCrossjoinWillConstrainUsingArgsFromAllAxes

public void testNativeCrossjoinWillConstrainUsingArgsFromAllAxes()

testLevelMembersWillConstrainUsingArgsFromAllAxes

public void testLevelMembersWillConstrainUsingArgsFromAllAxes()

testNativeCrossjoinWillExpandFirstLastChild

public void testNativeCrossjoinWillExpandFirstLastChild()

testNativeCrossjoinWillExpandLagInNamedSet

public void testNativeCrossjoinWillExpandLagInNamedSet()

testConstrainedMeasureGetsOptimized

public void testConstrainedMeasureGetsOptimized()

testNestedMeasureConstraintsGetOptimized

public void testNestedMeasureConstraintsGetOptimized()

testNonUniformNestedMeasureConstraintsGetOptimized

public void testNonUniformNestedMeasureConstraintsGetOptimized()

testNonUniformConstraintsAreNotUsedForOptimization

public void testNonUniformConstraintsAreNotUsedForOptimization()

testMeasureConstraintsInACrossjoinHaveCorrectResults

public void testMeasureConstraintsInACrossjoinHaveCorrectResults()

testContextAtAllWorksWithConstraint

public void testContextAtAllWorksWithConstraint()

testCalculatedDefaultMeasureOnVirtualCubeNoThrowException

public void testCalculatedDefaultMeasureOnVirtualCubeNoThrowException()
Before the fix this test would throw an IndexOutOfBounds exception in SqlConstraintUtils.removeDefaultMembers. The method assumed that the first member in the list would exist and be a measure. But, when the default measure is calculated, it would have already been removed from the list by removeCalculatedMembers, and thus the assumption was wrong.


testExpandNonNativeWithEnableNativeCrossJoin

public void testExpandNonNativeWithEnableNativeCrossJoin()
Test case for MONDRIAN-734, "Exception thrown when creating a "New Analysis View" with JPivot".


testNonEmptyCJWithMultiPositionSlicer

public void testNonEmptyCJWithMultiPositionSlicer()
Test case for MONDRIAN-695, "Unexpected data set may returned when MDX slicer contains multiple dimensions".


clearAndHardenCache

void clearAndHardenCache(MemberCacheHelper helper)

getSmartMemberReader

SmartMemberReader getSmartMemberReader(String hierName)

getSmartMemberReader

SmartMemberReader getSmartMemberReader(Connection con,
                                       String hierName)

getSharedSmartMemberReader

SmartMemberReader getSharedSmartMemberReader(String hierName)

getSharedSmartMemberReader

SmartMemberReader getSharedSmartMemberReader(Connection con,
                                             String hierName)

getEvaluator

RolapEvaluator getEvaluator(Result res,
                            int[] pos)

testFilterChildlessSnowflakeMembers2

public void testFilterChildlessSnowflakeMembers2()

testFilterChildlessSnowflakeMembers

public void testFilterChildlessSnowflakeMembers()

testBugMondrian897DoubleNamedSetDefinitions

public void testBugMondrian897DoubleNamedSetDefinitions()
Test case for MONDRIAN-897, "ClassCastException in CrossJoinArgFactory.allArgsCheapToExpand when defining a NamedSet as another NamedSet".


testMondrian1133

public void testMondrian1133()
Test case for MONDRIAN-1133

RolapNativeFilter would force the join to the fact table. Some queries don't need to be joined to it and gain in performance.


testMondrian1133WithAggs

public void testMondrian1133WithAggs()
Test case for MONDRIAN-1133

RolapNativeFilter would force the join to the fact table. Some queries don't need to be joined to it and gain in performance.

This one is for agg tables turned on.


Get Mondrian at SourceForge.net. Fast, secure and free Open Source software downloads