Skip to content

Commit

Permalink
MONDRIAN: Various improvements. Member/tuple queries can now join to …
Browse files Browse the repository at this point in the history
…a 'starting

    key', which trims orphan members. Treat the directed graph as un-directed
    when joining from that starting key. Add missing links in NewFoodMart schema.
    Default for ssas compatibility mode is now true.

[git-p4: depot-paths = "//open/mondrian-release/lagunitas/": change = 14542]
  • Loading branch information
julianhyde committed Aug 13, 2011
1 parent 83ecfba commit fa1b7b0
Show file tree
Hide file tree
Showing 10 changed files with 564 additions and 217 deletions.
4 changes: 3 additions & 1 deletion demo/NewFoodMart.xml
Expand Up @@ -402,7 +402,7 @@
<Hierarchy name='Gender'>
<Level attribute='Gender'/>
</Hierarchy>
<Hierarchy name='Marital Status'>
<Hierarchy name='Marital Status' allMemberName='All Marital Status'>
<Level attribute='Marital Status'/>
</Hierarchy>
<Hierarchy name='Yearly Income'>
Expand Down Expand Up @@ -453,7 +453,9 @@
<RegularDimensionLink dimension='Time' foreignKeyColumn='time_id'/>
<RegularDimensionLink dimension='Product' foreignKeyColumn='product_id'/>
<RegularDimensionLink dimension='Promotion' foreignKeyColumn='promotion_id'/>
<RegularDimensionLink dimension='Promotion Media' foreignKeyColumn='promotion_id'/>
<RegularDimensionLink dimension='Customer' foreignKeyColumn='customer_id'/>
<RegularDimensionLink dimension='Gender' foreignKeyColumn='customer_id'/>
</DimensionLinks>
</MeasureGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/main/mondrian/olap/MondrianProperties.xml
Expand Up @@ -1297,7 +1297,7 @@ whether to enable new naming behavior.</p>
[Dimension.Hierarchy].</p>
</Description>
<Type>boolean</Type>
<Default>false</Default>
<Default>true</Default>
</PropertyDefinition>
<PropertyDefinition>
<Name>XmlaSchemaRefreshInterval</Name>
Expand Down
13 changes: 13 additions & 0 deletions src/main/mondrian/olap/Util.java
Expand Up @@ -12,6 +12,7 @@
*/
package mondrian.olap;

import mondrian.rolap.RolapLevel;
import mondrian.server.Locus;
import org.apache.commons.vfs.*;
import org.apache.commons.vfs.provider.http.HttpFileObject;
Expand Down Expand Up @@ -1913,6 +1914,18 @@ public static int compareIntegers(int i0, int i1) {
return (i0 < i1 ? -1 : (i0 == i1 ? 0 : 1));
}

/**
* Returns the last item in a list.
*
* @param list List
* @param <T> Element type
* @return Last item in the list
* @throws IndexOutOfBoundsException if list is empty
*/
public static <T> T last(List<T> list) {
return list.get(list.size() - 1);
}

public static class ErrorCellValue {
public String toString() {
return "#ERR";
Expand Down

0 comments on commit fa1b7b0

Please sign in to comment.