Skip to content

Commit

Permalink
MONDRIAN-PACINO: Integrate to main @14869. (Disable triggers.)
Browse files Browse the repository at this point in the history
[git-p4: depot-paths = "//open/mondrian/": change = 14871]
  • Loading branch information
julianhyde committed Jan 3, 2012
1 parent 80b4573 commit 07d9893
Show file tree
Hide file tree
Showing 99 changed files with 11,371 additions and 4,201 deletions.
8 changes: 4 additions & 4 deletions build.properties
Expand Up @@ -12,16 +12,16 @@
Name=Mondrian
name=mondrian
vendor=Pentaho
project.revision=3.3-SNAPSHOT
project.revision=3.3.1-SNAPSHOT
project.revision.major=3
project.revision.minor=300014703
project.revision.minor=301014760
ivy.artifact.id=mondrian
ivy.artifact.group=pentaho
impl.title=mondrian
driver.name=Mondrian olap4j driver
driver.version=3.3.0.14703
driver.version=3.3.0.14760
driver.version.major=3
driver.version.minor=300014703
driver.version.minor=300014760

#dependency for olap4j
dependency.olap4j-core.revision=1.0.0-SNAPSHOT
Expand Down
10 changes: 7 additions & 3 deletions build.xml
Expand Up @@ -4,7 +4,7 @@
== Agreement, available at the following URL:
== http://www.eclipse.org/legal/epl-v10.html.
== Copyright (C) 2001-2003 Kana Software, Inc.
== Copyright (C) 2001-2011 Julian Hyde and others
== Copyright (C) 2001-2012 Julian Hyde and others
== All Rights Reserved.
== You must accept the terms of that agreement to use this software.
-->
Expand Down Expand Up @@ -169,6 +169,7 @@ demo/access/MondrianFoodMart.mdb"/>
<pathelement location="${lib.dir}/olap4j.jar"/>
<pathelement location="${lib.dir}/xalan.jar"/>
<pathelement location="${lib.dir}/xercesImpl.jar"/>
<pathelement location="${lib.dir}/validation-api.jar"/>
<pathelement path="${env.CLASSPATH}"/>
<pathelement location="${ant.home}/lib/ant.jar"/>
<pathelement location="${ant.home}/lib/optional.jar"/>
Expand Down Expand Up @@ -1525,7 +1526,7 @@ Assumes that mondrian.jar exists (use 'jar' target)">
<webinf dir="${build.dir}/mondrian/WEB-INF" excludes="web.xml"/>
<fileset dir="${build.dir}/mondrian" excludes="WEB-INF/**/*,*.jsp"/>
<fileset dir="${webapp.dir}" includes="*.*"/>
<lib dir="${lib.dir}" includes="${name}.jar,olap4j.jar,eigenbase-*.jar,xalan.jar,xmlunit.jar,*.dtd"/>
<lib dir="${lib.dir}" includes="${name}.jar,olap4j.jar,olap4j-xmla.jar,eigenbase-*.jar,xalan.jar,xmlunit.jar,*.dtd"/>
<classes dir="${javatest.dir}" includes="mondrian/xmla/**/*.xml"/>
<classes dir="${testclasses.dir}" includes="mondrian/xmla/test/**/*.*"/>
<classes dir="${testclasses.dir}" includes="mondrian/test/TestContext.*"/>
Expand Down Expand Up @@ -1583,7 +1584,7 @@ Creates mondrian-embedded.war based upon jpivot.war for Derby with embedded data

<fileset dir="${build.dir}/mondrian-embedded" excludes="busy.jsp,WEB-INF/**/*"/>
<fileset dir="${webapp.dir}" excludes="index.jsp,testpage.jsp,WEB-INF/**/*"/>
<lib dir="${lib.dir}" includes="${name}.jar,eigenbase-*.jar,xalan.jar,xmlunit.jar,derby.jar,*.dtd"/>
<lib dir="${lib.dir}" includes="${name}.jar,olap4j.jar,olap4j-xmla.jar,eigenbase-*.jar,xalan.jar,xmlunit.jar,derby.jar,*.dtd"/>
<classes dir="${demo.dir}/derby" includes="foodmart/**/*.*"/>
<classes dir="${javatest.dir}" includes="mondrian/xmla/**/*.xml"/>
<classes dir="${testclasses.dir}" includes="mondrian/xmla/test/**/*.*"/>
Expand Down Expand Up @@ -1614,6 +1615,9 @@ and lib contains ant.jar, junit.jar etc.">
<lib dir="${lib.dir}" includes="
${name}.jar,
javacup.jar,
olap4j.jar,
olap4j-xmla.jar,
eigenbase-*.jar,
xalan.jar"/>
</war>
</target>
Expand Down
3 changes: 2 additions & 1 deletion ivy.xml
Expand Up @@ -15,7 +15,7 @@
xmlns:m="http://ant.apache.org/ivy/maven"
xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">

<info organisation="pentaho" module="mondrian" revision="3.3-SNAPSHOT">
<info organisation="pentaho" module="mondrian" revision="3.3.1-SNAPSHOT">
<license name="EPL" url="http://www.eclipse.org/legal/epl-v10.html"/>
<ivyauthor name="Julian Hyde" />
<repository name="pentaho-repository" url="http://repo.pentaho.org/artifactory"/>
Expand Down Expand Up @@ -50,6 +50,7 @@
<dependency org="javacup" name="javacup" rev="10k"/>
<dependency org="net.java.dev.javacc" name="javacc" rev="5.0"/>
<dependency org="dom4j" name="dom4j" rev="1.6.1"/>
<dependency org="javax.validation" name="validation-api" rev="1.0.0.GA"/>
<dependency org="eigenbase" name="eigenbase-xom" rev="1.3.0.13768"/>
<dependency org="eigenbase" name="eigenbase-properties" rev="1.1.0.10924"/>
<dependency org="eigenbase" name="eigenbase-resgen" rev="1.3.0.13768"/>
Expand Down
12 changes: 10 additions & 2 deletions src/main/mondrian/calc/impl/DelegatingTupleList.java
Expand Up @@ -3,7 +3,7 @@
// This software is subject to the terms of the Eclipse Public License v1.0
// Agreement, available at the following URL:
// http://www.eclipse.org/legal/epl-v10.html.
// Copyright (C) 2011-2011 Julian Hyde
// Copyright (C) 2011-2012 Julian Hyde
// All Rights Reserved.
// You must accept the terms of that agreement to use this software.
*/
Expand Down Expand Up @@ -75,7 +75,15 @@ public int size() {
return list.size();
}
public Member set(int index, Member element) {
return list.get(index).set(column, element);
List<Member> subList = list.get(index);
if (subList.size() == 1) {
// The sub list is probably a singleton list.
// calling set() on it will fail. We have to
// create a new singleton list.
return list.set(index, Collections.singletonList(element))
.get(0);
}
return subList.set(column, element);
};
};
}
Expand Down
39 changes: 38 additions & 1 deletion src/main/mondrian/olap/Aggregator.java
Expand Up @@ -3,14 +3,18 @@
// This software is subject to the terms of the Eclipse Public License v1.0
// Agreement, available at the following URL:
// http://www.eclipse.org/legal/epl-v10.html.
// Copyright (C) 2003-2011 Julian Hyde
// Copyright (C) 2003-2012 Julian Hyde
// All Rights Reserved.
// You must accept the terms of that agreement to use this software.
*/
package mondrian.olap;

import mondrian.calc.Calc;
import mondrian.calc.TupleList;
import mondrian.spi.Dialect.Datatype;
import mondrian.spi.SegmentBody;

import java.util.List;

/**
* Describes an aggregation operator, such as "sum" or "count".
Expand All @@ -25,6 +29,8 @@
public interface Aggregator {
/**
* Returns the aggregator used to combine sub-totals into a grand-total.
*
* @return aggregator used to combine sub-totals into a grand-total
*/
Aggregator getRollup();

Expand All @@ -35,8 +41,39 @@ public interface Aggregator {
* @param evaluator Evaluation context
* @param members List of members, not null
* @param calc Expression to evaluate
*
* @return result of applying this aggregator to a set of members/tuples
*/
Object aggregate(Evaluator evaluator, TupleList members, Calc calc);

/**
* Tells Mondrian if this aggregator can perform fast aggregation
* using only the raw data of a given object type. This will
* determine if Mondrian will attempt to perform in-memory rollups
* on raw segment data by invoking {@link #aggregate(java.util.List)}.
*
* <p>This is only invoked for rollup operations.
*
* @param datatype The datatype of the object we would like to rollup.
* @return Whether this aggregator supports fast aggregation
*/
boolean supportsFastAggregates(Datatype datatype);

/**
* Applies this aggregator over a raw list of objects for a rollup
* operation. This is useful when the values are already resolved
* and we are dealing with a raw {@link SegmentBody} object.
*
* <p>Only gets called if
* {@link #supportsFastAggregates(mondrian.spi.Dialect.Datatype)} is true.
*
* <p>This is only invoked for rollup operations.
*
* @param rawData An array of values in its raw form, to be aggregated.
* @return A rolled up value of the raw data.
* if the object type is not supported.
*/
Object aggregate(List<Object> rawData);
}

// End Aggregator.java
6 changes: 4 additions & 2 deletions src/main/mondrian/olap/Connection.java
Expand Up @@ -4,7 +4,7 @@
// Agreement, available at the following URL:
// http://www.eclipse.org/legal/epl-v10.html.
// Copyright (C) 2000-2002 Kana Software, Inc.
// Copyright (C) 2001-2011 Julian Hyde and others
// Copyright (C) 2001-2012 Julian Hyde and others
// All Rights Reserved.
// You must accept the terms of that agreement to use this software.
//
Expand All @@ -16,6 +16,8 @@
import java.util.Locale;
import javax.sql.DataSource;

import javax.validation.constraints.*;

/**
* Connection to a multi-dimensional database.
*
Expand Down Expand Up @@ -126,7 +128,7 @@ public interface Connection {
*
* @param pw Writer to which to write logging information; may be null
*/
CacheControl getCacheControl(PrintWriter pw);
CacheControl getCacheControl(@Null PrintWriter pw);

/**
* Returns the data source this connection uses to create connections
Expand Down
62 changes: 1 addition & 61 deletions src/main/mondrian/olap/MondrianProperties.xml
Expand Up @@ -4,7 +4,7 @@
== Agreement, available at the following URL:
== http://www.eclipse.org/legal/epl-v10.html.
== You must accept the terms of that agreement to use this software.
== Copyright (C) 2011-2011 Julian Hyde
== Copyright (C) 2011-2012 Julian Hyde
== All Rights Reserved.
==
== Definitions of configuration properties used by Mondrian. From this file,
Expand Down Expand Up @@ -304,66 +304,6 @@ is an implementation of {@link mondrian.spi.SegmentCache}.
</Description>
<Type>String</Type>
</PropertyDefinition>
<PropertyDefinition>
<Name>SegmentCacheReadTimeout</Name>
<Path>mondrian.rolap.SegmentCacheReadTimeout</Path>
<Description>
<p>Property which defines the timeout for
{@link mondrian.spi.SegmentCache#get(mondrian.rolap.agg.SegmentHeader)}
in milliseconds. Defaults to 5000.</p>

<p>This is an internal control property. The timeout value
won't be passed to the underlying
{@link mondrian.spi.SegmentCache} SPI.</p>
</Description>
<Type>int</Type>
<Default>5000</Default>
</PropertyDefinition>
<PropertyDefinition>
<Name>SegmentCacheWriteTimeout</Name>
<Path>mondrian.rolap.SegmentCacheWriteTimeout</Path>
<Description>
<p>Property which defines the timeout for
{@link mondrian.spi.SegmentCache#put(mondrian.rolap.agg.SegmentHeader, mondrian.rolap.agg.SegmentBody)}
in milliseconds. Defaults to 5000.</p>

<p>This is an internal control property. The timeout value
won't be passed to the underlying
{@link mondrian.spi.SegmentCache} SPI.</p>
</Description>
<Type>int</Type>
<Default>5000</Default>
</PropertyDefinition>
<PropertyDefinition>
<Name>SegmentCacheLookupTimeout</Name>
<Path>mondrian.rolap.SegmentCacheLookupTimeout</Path>
<Description>
<p>Property which defines the timeout for
{@link mondrian.spi.SegmentCache#contains(mondrian.rolap.agg.SegmentHeader)}
in milliseconds. Defaults to 5000.</p>

<p>This is an internal control property. The timeout value
won't be passed to the underlying
{@link mondrian.spi.SegmentCache} SPI.</p>
</Description>
<Type>int</Type>
<Default>5000</Default>
</PropertyDefinition>
<PropertyDefinition>
<Name>SegmentCacheScanTimeout</Name>
<Path>mondrian.rolap.SegmentCacheScanTimeout</Path>
<Description>
<p>Property which defines the timeout for
{@link mondrian.spi.SegmentCache#getSegmentHeaders()}
in milliseconds. Defaults to 5000.</p>

<p>This is an internal control property. The timeout value
won't be passed to the underlying
{@link mondrian.spi.SegmentCache} SPI.</p>
</Description>
<Type>int</Type>
<Default>5000</Default>
</PropertyDefinition>
<PropertyDefinition>
<Name>SparseSegmentCountThreshold</Name>
<Path>mondrian.rolap.SparseSegmentValueThreshold</Path>
Expand Down

0 comments on commit 07d9893

Please sign in to comment.