Skip to content

Commit

Permalink
MONDRIAN: revert the change accidentally checked in 10278.
Browse files Browse the repository at this point in the history
[git-p4: depot-paths = "//open/mondrian/": change = 10381]
  • Loading branch information
Rushan Chen committed Jan 2, 2008
1 parent 45be362 commit 3783f8e
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 64 deletions.
92 changes: 29 additions & 63 deletions mondrian.properties
Expand Up @@ -30,15 +30,11 @@ RoleXX='California manager';
# Put the JDBC driver jar into mondrian/testlib.

# Derby: needs user and password
mondrian.foodmart.jdbcURL=jdbc:derby:demo/derby/foodmart
mondrian.foodmart.jdbcUser=sa
mondrian.foodmart.jdbcPassword=sa
mondrian.jdbcDrivers=org.apache.derby.jdbc.EmbeddedDriver
driver.classpath=testlib/derby.jar
mondrian.test.jdbcUser=sa
mondrian.test.jdbcPassword=sa
mondrian.test.jdbcURL=jdbc:derby:demo/derby/foodmart
mondrian.catalogURL=file:/home/rchen/open/mondrian/demo/FoodMart.xml
#mondrian.foodmart.jdbcURL=jdbc:derby:demo/derby/foodmart
#mondrian.foodmart.jdbcUser=sa
#mondrian.foodmart.jdbcPassword=sa
#mondrian.jdbcDrivers=org.apache.derby.jdbc.EmbeddedDriver
#driver.classpath=testlib/derby.jar

# FireBirdSQL
#mondrian.foodmart.jdbcURL=jdbc:firebirdsql:localhost/3050:/mondrian/foodmart.gdb
Expand All @@ -48,52 +44,19 @@ mondrian.catalogURL=file:/home/rchen/open/mondrian/demo/FoodMart.xml
# LucidDB
# (see http://docs.eigenbase.org/LucidDbOlap)
#mondrian.foodmart.jdbcURL=jdbc:luciddb:rmi://localhost
#mondrian.foodmart.jdbcUser=sa
#mondrian.jdbcDrivers=com.lucidera.jdbc.LucidDbRmiDriver
#driver.classpath=/home/rchen/open/mondrian/testlib/LucidDbClient.jar
#mondrian.test.jdbcUser=sa
#mondrian.test.jdbcPassword=
#mondrian.test.jdbcURL=jdbc:luciddb:rmi://localhost
#mondrian.catalogURL=file:/home/rchen/open/mondrian/demo/LUCIDERA_ANALYTICS.mondrian.xml
#mondrian.test.connectString="Provider=mondrian; Jdbc=jdbc:luciddb:rmi://localhost; JdbcUser=sa; catalog=file:/home/rchen/open/mondrian/demo/LUCIDERA_ANALYTICS.mondrian.xml; JdbcDrivers=com.lucidera.jdbc.LucidDbRmiDriver"

#mondrian.foodmart.jdbcURL=jdbc:luciddb:rmi://localhost
#mondrian.foodmart.jdbcUser=FOODMART
#mondrian.jdbcDrivers=com.lucidera.jdbc.LucidDbRmiDriver
#driver.classpath=/home/rchen/open/mondrian/testlib/LucidDbClient.jar
#mondrian.test.jdbcUser=FOODMART
#mondrian.test.jdbcPassword=
#mondrian.test.jdbcURL=jdbc:luciddb:rmi://localhost
#mondrian.catalogURL=file:/home/rchen/open/mondrian/demo/FoodMart.xml
#mondrian.test.connectString="Provider=mondrian; Jdbc=jdbc:luciddb:rmi://localhost; JdbcUser=FOODMART; catalog=file:/home/rchen/open/mondrian/demo/FoodMart.xml; JdbcDrivers=com.lucidera.jdbc.LucidDbRmiDriver"

#mondrian.foodmart.jdbcURL=jdbc:luciddb:rmi://smdevdk24:5434
#mondrian.foodmart.jdbcUser=FOODMART
#mondrian.jdbcDrivers=com.lucidera.jdbc.LucidDbRmiDriver
#driver.classpath=/home/rchen/open/mondrian/testlib/LucidDbClient.jar
#mondrian.test.jdbcUser=FOODMART
#mondrian.test.jdbcPassword=
#mondrian.test.jdbcURL=jdbc:luciddb:rmi://smdevdk24:5434
#mondrian.catalogURL=file:/home/rchen/open/mondrian/demo/FoodMart.xml
#mondrian.test.connectString="Provider=mondrian; Jdbc=jdbc:luciddb:rmi://smdevdk24:5434; JdbcUser=FOODMART; catalog=file:/home/rchen/open/mondrian/demo/FoodMart.xml; JdbcDrivers=com.lucidera.jdbc.LucidDbRmiDriver"

#mondrian.foodmart.jdbcURL=jdbc:luciddb:rmi://smdevdk24:5434
#mondrian.foodmart.jdbcUser=sa
#mondrian.jdbcDrivers=com.lucidera.jdbc.LucidDbRmiDriver
#driver.classpath=/home/rchen/open/mondrian/testlib/LucidDbClient.jar
#mondrian.test.jdbcUser=sa
#mondrian.test.jdbcPassword=
#mondrian.test.jdbcURL=jdbc:luciddb:rmi://smdevdk24:5434
#mondrian.catalogURL=file:/home/rchen/open/mondrian/demo/LUCIDERA_ANALYTICS.mondrian.xml
#mondrian.test.connectString="Provider=mondrian; Jdbc=jdbc:luciddb:rmi://smdevdk24:5434; JdbcUser=sa; JdbcPassword=sa; catalog=file:/home/rchen/open/mondrian/demo/LUCIDERA_ANALYTICS.mondrian.xml; JdbcDrivers=com.lucidera.jdbc.LucidDbRmiDriver"
#driver.classpath=/path/to/luciddb/plugin/LucidDbClient.jar

# Oracle (needs user and password)
#mondrian.foodmart.jdbcURL=jdbc:oracle:thin:foodmart/foodmart@localhost:1521
#mondrian.jdbcDrivers=oracle.jdbc.driver.OracleDriver
#driver.classpath=/home/rchen/open/mondrian/lib/ojdbc14.jar
#mondrian.catalogURL=file:/home/rchen/open/mondrian/demo/FoodMart.xml
#mondrian.test.jdbcURL=jdbc:oracle:thin:foodmart/foodmart@localhost:1521
#mondrian.test.connectString="Provider=mondrian; Jdbc=jdbc:oracle:thin:foodmart/foodmart@localhost:1521; JdbcUser=foodmart; catalog=file:/home/rchen/open/mondrian/demo/FoodMart.xml; JdbcDrivers=oracle.jdbc.driver.OracleDriver"
#oracle.home=G:/oracle/product/10.1.0/Db_1
#mondrian.foodmart.jdbcURL.oracle=jdbc:oracle:thin:@//<host>:<port>/<service_name>
#mondrian.foodmart.jdbcURL=jdbc:oracle:thin:foodmart/foodmart@//stilton:1521/orcl
#mondrian.foodmart.jdbcURL=jdbc:oracle:oci8:foodmart/foodmart@orcl
#mondrian.foodmart.jdbcUser=FOODMART
#mondrian.foodmart.jdbcPassword=oracle
#mondrian.jdbcDrivers=oracle.jdbc.OracleDriver
#driver.classpath=/home/jhyde/open/mondrian/lib/ojdbc14.jar

# ODBC (Microsoft Access)
#mondrian.foodmart.jdbcURL=jdbc:odbc:MondrianFoodMart
Expand All @@ -107,10 +70,11 @@ mondrian.catalogURL=file:/home/rchen/open/mondrian/demo/FoodMart.xml

# MySQL: needs user and password set in JDBC URL
#mondrian.foodmart.jdbcURL=jdbc:mysql://localhost/foodmart?user=foodmart&password=foodmart
#mondrian.foodmart.jdbcURL=jdbc:mysql://localhost/foodmart
#mondrian.foodmart.jdbcUser=foodmart
#mondrian.foodmart.jdbcPassword=foodmart
#mondrian.jdbcDrivers=com.mysql.jdbc.Driver
#driver.classpath=/home/rchen/open/mondrian/testlib/mysql-connector-java-3.1.14-bin.jar
#mondrian.catalogURL=file:/home/rchen/open/mondrian/demo/FoodMart.xml
#mondrian.test.jdbcURL=jdbc:mysql://localhost/foodmart?user=foodmart&password=foodmart
#driver.classpath=D:/mysql-connector-3.1.12

# Ingres
#mondrian.foodmart.jdbcURL=jdbc:ingres://192.168.200.129:II7/MondrianFoodMart;LOOP=on;AUTO=multi;UID=ingres;PWD=sergni
Expand Down Expand Up @@ -150,42 +114,43 @@ mondrian.catalogURL=file:/home/rchen/open/mondrian/demo/FoodMart.xml
# "public [static] junit.framework.Test suite()".
#
# Example:
#mondrian.test.Class=mondrian.rolap.FastBatchingCellReaderTest
#mondrian.test.Class=mondrian.rolap.FastBatchingCellReaderTest
# mondrian.test.Class=mondrian.test.FoodMartTestCase
#mondrian.test.Class=

###############################################################################
# Property which determines which tests are run.
# This is a regular expression as defined by java.util.regex.Pattern.
# If this property is specified, only tests whose names match the pattern
# in its entirety will be run.
#mondrian.test.Name=testAggregateDistinctCount4
#mondrian.test.Name=

###############################################################################
# Where the test XML files are.
#mondrian.test.QueryFileDirectory=testsrc/queryFiles


###############################################################################
# A pattern for which test XML files to run. Pattern has to match a file name
# of the form: query<whatever>.xml in the directory.
#
# Example:
# mondrian.test.QueryFilePattern=queryTest_fec[A-Za-z0-9_]*.xml
#mondrian.test.QueryFilePattern=

###############################################################################
# Diagnostics & tuning

# Set mondrian logging information if not provided by containing application.
# Replace LOG4J_PROPERTIES_LOCATION with path to log4j.properties file.
log4j.configuration=/home/rchen/open/mondrian/log4j.properties
#log4j.configuration=file://LOG4J_PROPERTIES_LOCATION/log4j.xml

###############################################################################
# Property which controls the amount of tracing displayed.
#
# If trace level is above 0, SQL tracing will be enabled and logged as
# per the "mondrian.debug.out.file" below. This is separate from Log4j
# logging.
mondrian.trace.level=1
mondrian.debug.out.file=trace.out
#mondrian.trace.level=0

###############################################################################
# Property containing the name of the file to which tracing is to be
Expand Down Expand Up @@ -229,7 +194,7 @@ mondrian.debug.out.file=trace.out
# Aggregates can be read from the database using the
# ReadAggregates property but will not be used unless this
# property is set to true.
mondrian.rolap.aggregates.Use=true
#mondrian.rolap.aggregates.Use=false

###############################################################################
# Boolean property which determines whether Mondrian should read aggregate
Expand All @@ -238,7 +203,8 @@ mondrian.rolap.aggregates.Use=true
# If set to true, then Mondrian scans the database for aggregate tables.
# Unless mondrian.rolap.aggregates.Use is set to true, the aggregates
# found will not be used.
mondrian.rolap.aggregates.Read=true
#mondrian.rolap.aggregates.Read=false


###############################################################################
# Boolean property which determines whether Mondrian optimizes predicates and
Expand Down Expand Up @@ -407,7 +373,7 @@ mondrian.rolap.iterationLimit=0
# between test setting and property file setting is:
# Settings besides "NONE" in mondrian.properties file < Any setting in the test < "ANY"
#
mondrian.test.WarnIfNoPatternForDialect=ANY
#mondrian.test.WarnIfNoPatternForDialect=NONE

###############################################################################
# Property which defines whether to ignore measure when non joining
Expand Down
8 changes: 7 additions & 1 deletion src/main/mondrian/olap/fun/AggregateFunDef.java
Expand Up @@ -73,10 +73,12 @@ public double evaluateDouble(Evaluator evaluator) {
}
final List list = evaluateCurrentList(listCalc, evaluator);
if (aggregator == RolapAggregator.DistinctCount) {
//If the list is empty, there is no need to evaluate any further
// If the list is empty, it means the current context
// contains no qualifying cells. The result set is empty.
if (list.size() == 0) {
return DoubleNull;
}

// TODO: Optimize the list
// E.g.
// List consists of:
Expand Down Expand Up @@ -125,6 +127,10 @@ public double evaluateDouble(Evaluator evaluator) {
* @param list
*/
private void checkIfAggregationSizeIsTooLarge(List list) {
/*
* REVIEW: Could something other than a hard coded value be used here,
* e.g. something configurable?
*/
if (list.size() > 100) {
throw newEvalException(
null,"Distinct Count aggregation is not supported over a " +
Expand Down

0 comments on commit 3783f8e

Please sign in to comment.