[Mondrian] Drillthrough column order

Matt Campbell mcampbell at pentaho.com
Wed Feb 27 17:19:17 EST 2013


I committed a change to lagunitas which will keep the order of the columns as they appear in the levels in the cube.  The change also partially addresses MONDRIAN-1460 in that the RETURN clause ordering will now be honored for levels.  Let me know if it looks reasonable.

https://github.com/pentaho/mondrian/commit/fa79d7ef524c906319726dcccd0494c6da6dc0ea


From: mondrian-bounces at pentaho.org [mailto:mondrian-bounces at pentaho.org] On Behalf Of Julian Hyde
Sent: Tuesday, February 26, 2013 1:12 PM
To: Mondrian developer mailing list
Subject: Re: [Mondrian] Drillthrough column order

The column order should be well-defined even if there isn't a RETURN clause present. If should be as if there is a RETURN clause for the key & name columns of all attributes of all dimensions. (Or something like that... write a specification that makes sense.)

Julian


On Feb 26, 2013, at 7:49 AM, Matt Campbell <mcampbell at pentaho.com<mailto:mcampbell at pentaho.com>> wrote:


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> [mailto:mondrian-bounces at pentaho.org<mailto: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

_______________________________________________
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/20130227/af4f0b31/attachment.html 


More information about the Mondrian mailing list