[Mondrian] proposal for Order function with key specification list

Julian Hyde jhyde at pentaho.com
Fri Sep 5 17:55:25 EDT 2008


> Regarding the discussion on input/output order stability 
> below, Rushan 
> was also asking about other functions such as Generate and 
> Exists (not 
> just Order).  The MS docs are silent for these functions, 
> implying that 
> MDX query authors should not make any assumptions about the result 
> order. This also implies that implementations are free to use 
> optimizations which might destroy order (for example, Zelaine has 
> prototyped a HashMap-based implementation of Exists).

Not so fast. You, a SQL guy, might infer that order is unspecified, but a
lisp guy (or girl) would not. They don't specify that <Hierarchy>.Members
returns the members in order, but every MDX user assumes that.

The Microsoft online documentation is not canon. Actually, there is no canon
for MDX. I would seek a second opinion from one of the better MDX books
(e.g. George Spofford, Mosha Pasumansky) and see what they say about the
ordering of various functions.

And the fact that they introduced Unorder is an indication that elsewhere in
MDX, order matters.


More information about the Mondrian mailing list