Skip to content

Commit

Permalink
fix bug (that was already fixed) for catalog restriction in XMLA requ…
Browse files Browse the repository at this point in the history
…ests (for ssas / palo)

git-svn-id: https://olap4j.svn.sourceforge.net/svnroot/olap4j/trunk@403 c6a108a4-781c-0410-a6c6-c2d559e19af0
  • Loading branch information
pstoellberger committed Mar 11, 2011
1 parent 35f2e94 commit 6987348
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/org/olap4j/driver/xmla/XmlaOlap4jConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -852,15 +852,18 @@ public String generateRequest(
}

// If the request requires catalog name, and one wasn't specified in the
// restrictions, use the connection's current schema. (Note: What XMLA
// calls a catalog, JDBC calls a schema.)
if (context.olap4jSchema != null) {
requestCatalogName = context.olap4jSchema.getName();
// restrictions, use the connection's current catalog.
if (context.olap4jCatalog != null) {
requestCatalogName = context.olap4jCatalog.getName();
}
if (requestCatalogName == null
&& metadataRequest.requiresCatalogName())
{
requestCatalogName = context.olap4jConnection.getSchema().getName();
List<Catalog> catalogs =
context.olap4jConnection.getMetaData().getOlapCatalogs();
if (catalogs.size() > 0) {
requestCatalogName = catalogs.get(0).getName();
}
}

// Add the catalog node only if this request has specified it as a
Expand Down

0 comments on commit 6987348

Please sign in to comment.