Skip to content

Commit

Permalink
Fix bugs for XMLA compatibility with SSAS (unique members and measure…
Browse files Browse the repository at this point in the history
… groups) and PALO (avoid unnecessary metadata requests in dummy cube for shared dimensions)

git-svn-id: https://olap4j.svn.sourceforge.net/svnroot/olap4j/trunk@486 c6a108a4-781c-0410-a6c6-c2d559e19af0
  • Loading branch information
pstoellberger committed Jan 18, 2012
1 parent f5ce571 commit 21a1d43
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/org/olap4j/driver/xmla/XmlaOlap4jCube.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ class XmlaOlap4jCube implements Cube, Named
new CachingMetadataReader(
new RawMetadataReader(),
measuresMap);
// In case this is the dummy cube for shared dimensions stop here
// to avoid unnecessary calls and errors with unique members
if ("".equals(name)) {
namedSets = null;
dimensions = null;
return;
}

final XmlaOlap4jConnection olap4jConnection =
olap4jSchema.olap4jCatalog.olap4jDatabaseMetaData.olap4jConnection;

Expand Down Expand Up @@ -440,6 +448,12 @@ public XmlaOlap4jMember lookupMemberByUniqueName(
case 1:
return list.get(0);
default:
String providerName =
olap4jSchema.olap4jCatalog.olap4jDatabaseMetaData
.olap4jConnection.getOlapDatabase().getProviderName();
if ("Microsoft Analysis Services".equals(providerName)) {
return list.get(0);
}
throw new IllegalArgumentException(
"more than one member with unique name '"
+ memberUniqueName
Expand Down

0 comments on commit 21a1d43

Please sign in to comment.