The current implementation of the method lookupCube in the class XmlaOlap4jCellSet searches for the cube with the given name in all the available catalogs. This means if I connect to OLAP "Server01" and catalog "XYZ" and I (mdx) query cube "CubeName" it might return results from cube "CubeName" in catalog "ABC". This is because catalog "ABC" might be find first and than the cube name matches.
The fact is that lookupCube is only called by createMetaData with does this according to the javadoc "Creates metadata for a cell set, given the DOM of the XMLA result.". This means it creates metadata for the current query and connection and so the current catalog. Shouldnt the lookupCube method use the current catalog from the connection as well? I think it's very strange that if you specify this catalog in the connection it takes a look at another catalog…
I pruprose the method lookupCube should be changed to use the active catalog, see patch "active catalog only".
If the connection is suposed to support multiple catalogs I think it should take the specified (in the connection string) catalog first and searches for a cube in that "active" catalog. If not found it might search in other catalogs. Maybe this is the best option for all users, see patch "active catalog first" for a simple implementation.
Log in to post a comment.