[Mondrian] Re: Regression tests MonetDB

Julian Hyde jhyde at pentaho.com
Tue Feb 24 03:16:45 EST 2009


> What about the other test. Especially the upper on a number 
> comparing it 
> to a list of countries?

I know it looks kind of dumb. But:

1. The members appear in the query unqualified, so mondrian has to search
the top level of all dimensions to find the members. [20319] could have been
[Store].[20319] or [Gender].[20319] but was actually [Store Size in
SQFT].[20319].

WITH MEMBER [Store Size in SQFT].[Less Than 23000] AS  'AGGREGATE({[20319],
[21215], [22478]}, (4 * 5) / 6)'
SELECT {[Store].[All Stores], [Store].[All Stores].Children} ON AXIS(0),
       {[Store Size in SQFT].[Less Than 23000], [Store Size in
SQFT].Children} ON AXIS(1)
FROM [Sales]

2. We do 'upper' on both sides because MDX is case-insensitive for
identifiers. (By default. There is a property to override this.)

3. Why do we generate upper of a string literal in SQL? Because collations
are complicated. If we converted the literal to upper case in Java there is
a possibility that we'd get a different answer from SQL.

Julian





More information about the Mondrian mailing list