[Mondrian] xmla servlet - bug in RowsetDefinition

Michele Rossi michele.rossi at gmail.com
Tue May 24 09:21:33 EDT 2011

I've discovered another part of RowsetDefinition which can only work
reliably using the mondrian olap4j driver.

The line number is 5096 and the code snippet in question is the following:

protected void populateCatalog(
            OlapConnection connection,
            Catalog catalog,
            List<Row> rows)
            throws XmlaException, SQLException
            // SQL Server actually includes the LEVELS_LIST row
            StringBuilder buf = new StringBuilder(100);

            for (Schema schema : filter(catalog.getSchemas(),
schemaNameCond)) {
                for (Cube cube : filter(sortedCubes(schema), cubeNameCond))
                    Dimension measuresDimension =
                    Hierarchy measuresHierarchy =

As you can see there is a strong assumption made here: that the first
dimension in the list contains the Measures.
The right way to do this is to iterate through the array and stop when
"dimension type" is MEASURE.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20110524/833b84d6/attachment.html 

More information about the Mondrian mailing list