[Mondrian] Drillthrough column order

Matt Campbell mcampbell at pentaho.com
Tue Feb 26 10:49:56 EST 2013


Created MONDRIAN-1460 to fix the ordering case when a RETURN clause is present.

This came up while investigating a failure in lagunitas with testCubesDrillthroughReturnClause9, which does not have a RETURN clause.  The test brings back the same results as Mondrian 3x, just in a different order.

What do you think?  I could fix the test by modifying the order in the expected values, or making the test order insensitive (possibly including a check that dimension related attributes are grouped à la SSAS).


From: mondrian-bounces at pentaho.org [mailto:mondrian-bounces at pentaho.org] On Behalf Of Luc Boudreau
Sent: Tuesday, February 26, 2013 10:39 AM
To: Mondrian developer mailing list
Subject: Re: [Mondrian] Drillthrough column order

When the return clause is omitted, SSAS does not return the rows in any particular order, except that it will group the columns by groups of keys. ie, the following MDX:

DRILLTHROUGH

SELECT

   { [Measures].[Store Sales]} on AXIS (0),

   { [Product].[Food].[Frozen Foods]} on AXIS (1),

   { [Time].[Year].[1997] } on AXIS (2)

FROM

   [SALES]
...returns store_sales, store_name, store_city, store_state, store_country, the_date, and so on. Notice that the store-related columns are together.

When the RETURN clause is used, we should definitely return the columns in that order.

Luc

On Tue, Feb 26, 2013 at 10:15 AM, Matt Campbell <mcampbell at pentaho.com<mailto:mcampbell at pentaho.com>> wrote:
Is there a “correct” order that drillthrough columns should come back in?  Currently they come back somewhat arbitrarily in the order they appear in the constrained column bitkey.

If a RETURN statement is present it could be argued they should appear in exactly the order in the RETURN.  E.g. City should come before month in the query below.  Analysis Services appears to honor that ordering, but Mondrian does not.  With no RETURN statement, though, it’s not clear whether there should be any specific order expected.

DRILLTHROUGH
    SELECT {[Measures].[Unit Sales]} on columns
    from [Sales]
    where ([Promotions].[One Day Sale],
        [Store].[Store City].[Walla Walla],
        [Product].[Product Category].[Bread])
RETURN
[Customers].[City],[Time].[Month]



_______________________________________________
Mondrian mailing list
Mondrian at pentaho.org<mailto:Mondrian at pentaho.org>
http://lists.pentaho.org/mailman/listinfo/mondrian

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20130226/b6bc1817/attachment-0001.html 


More information about the Mondrian mailing list