mondrian.rolap.aggmatcher
Class Checkin_7634

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by mondrian.test.FoodMartTestCase
              extended by mondrian.test.loader.CsvDBTestCase
                  extended by mondrian.rolap.aggmatcher.Checkin_7634
All Implemented Interfaces:
junit.framework.Test

public class Checkin_7634
extends CsvDBTestCase

Checkin 7634 attempted to correct a problem demonstrated by this junit. The CrossJoinFunDef class has an optimization that kicks in when the combined lists sizes are greater than 1000. I create a property here which, if set, can be used to change that size from 1000 to, in this case, 2. Also, there is a property that disables the use of the optimization altogether and another that permits the use of the old optimization, currently the nonEmptyListOld method in the CrossJoinFunDef class, and the new, checkin 7634, version of the method called nonEmptyList.

The old optimization only looked at the default measure while the new version looks at all measures appearing in the query. The example Cube and data for the junit is such that there is no data for the default measure. Thus the old optimization fails to produce the correct result.

Author:
Richard M. Emberson

Field Summary
 
Fields inherited from class mondrian.test.FoodMartTestCase
propSaver
 
Constructor Summary
Checkin_7634()
           
Checkin_7634(String name)
           
 
Method Summary
protected  String getCubeDescription()
           
protected  String getDirectoryName()
           
protected  String getFileName()
           
 void testCrossJoin()
           
 
Methods inherited from class mondrian.test.loader.CsvDBTestCase
createTestContext, getNamedSetDescription, getParameterDescription, getRoleDescription, getSchema, getSqlConnection, getTestContext, getUdfDescription, getVirtualCubeDescription, isApplicable, setUp, tearDown
 
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
 

Constructor Detail

Checkin_7634

public Checkin_7634()

Checkin_7634

public Checkin_7634(String name)
Method Detail

testCrossJoin

public void testCrossJoin()
                   throws Exception
Throws:
Exception

getDirectoryName

protected String getDirectoryName()
Specified by:
getDirectoryName in class CsvDBTestCase

getFileName

protected String getFileName()
Specified by:
getFileName in class CsvDBTestCase

getCubeDescription

protected String getCubeDescription()
Overrides:
getCubeDescription in class CsvDBTestCase

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