Class NonEmptyTest


  • public class NonEmptyTest
    extends BatchTestCase
    Tests for NON EMPTY Optimization, includes SqlConstraint type hierarchy and RolapNative classes.
    Since:
    Nov 21, 2005
    Author:
    av
    • Constructor Detail

      • NonEmptyTest

        public NonEmptyTest()
      • NonEmptyTest

        public NonEmptyTest​(String name)
    • Method Detail

      • 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.
      • 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.
      • testCmInSlicerResults

        public void testCmInSlicerResults()
      • testSetInSlicerResults

        public void testSetInSlicerResults()
      • 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()
      • 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()
      • 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.
      • testFilterChildlessSnowflakeMembers2

        public void testFilterChildlessSnowflakeMembers2()
      • testFilterChildlessSnowflakeMembers

        public void testFilterChildlessSnowflakeMembers()
      • 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.

      • testNonEmptyAggregateSlicerIsNative

        public void testNonEmptyAggregateSlicerIsNative()
        Native CrossJoin with a ranged slicer.
      • testMondrian1658

        public void testMondrian1658()
        Test case for MONDRIAN-1658

        Error: Tuple length does not match arity

        An empty set argument to crossjoin caused native evaluation to return an incorrect type which in turn caused the types for each argument to union to be different

      • testMondrian2202WithConflictingMemberInSlicer

        public void testMondrian2202WithConflictingMemberInSlicer()
      • testMondrian2202WithCrossjoin

        public void testMondrian2202WithCrossjoin()
      • testMondrian2202WithLevelMembers

        public void testMondrian2202WithLevelMembers()
      • testMondrian2202WithAggTopCountSet

        public void testMondrian2202WithAggTopCountSet()
      • testMondrian2202WithParameter

        public void testMondrian2202WithParameter()
      • testMondrian2202WithFilter

        public void testMondrian2202WithFilter()
      • testMondrian2202WithTopCount

        public void testMondrian2202WithTopCount()
      • testMondrian2202WithMeasureContainingCJ

        public void testMondrian2202WithMeasureContainingCJ()
      • testMon2202RunningSum

        public void testMon2202RunningSum()
      • testMon2202AnalyzerTopCount

        public void testMon2202AnalyzerTopCount()
      • testMon2202AnalyzerFilter

        public void testMon2202AnalyzerFilter()
      • testMon2202AnalyzerPercOfMeasure

        public void testMon2202AnalyzerPercOfMeasure()
      • testMon2202AnalyzerRunningSum

        public void testMon2202AnalyzerRunningSum()
      • testMon2202SeveralFilteredHierarchiesPlusMeasureFilter

        public void testMon2202SeveralFilteredHierarchiesPlusMeasureFilter()
      • testMon2202AnalyzerCompoundMeasureFilterPlusTopCount

        public void testMon2202AnalyzerCompoundMeasureFilterPlusTopCount()