[Mondrian] Question re: Hierarchize function.

Julian Hyde jhyde at pentaho.com
Wed Aug 4 13:58:47 EDT 2010


Easiest thing is probably to write a UDF that does what you want -- call it
say 'MyHierarchize' -- then change jpivot to use that function rather than
Hierarchize.
 
I don't want to change the behavior of the Hierarchize function. It's a
standard MDX function. But I would consider adding the UDF to the distro as
long as it had a regression test.
 
Julian


  _____  

From: mondrian-bounces at pentaho.org [mailto:mondrian-bounces at pentaho.org] On
Behalf Of Ati Rosselet
Sent: Wednesday, August 04, 2010 12:48 AM
To: Mondrian developer mailing list
Subject: [Mondrian] Question re: Hierarchize function.


I'm using jpivot and have the following problem.  When I arrange the
elements of a dimension/level to be in a certain order, all is fine, but if
I expand any members, then a Hierarchize function is wrapped around the
selected items + member's children and that ALWAYS reorders the list -
moving calculated members to the end, and ordering members at each level by
ordinal/member name.

Is there any way to keep the order of the elements when performing a
hierarchize so that the children of each member are placed under that member
as expected, but the order of the members in each level is kept as the order
in the query?

Also, I ran into a bizarre bug in using jpivot.  2 Query objects with
identical MDX queries (from toString)  result in different results from
mondrian.  This only occurs when using roles. I found that if I reset the
query using the MDX string it contains (as if set via GUI), then all works
find, otherwise is seems as though the All members in some hierarchies are
not role filtered, and are plain RollupMember-s instead of
LimitedRollupMember-es. (I exported the query objects to xml).   Does
Mondrian refilter Query objects with respect to roles, or does it somehow
assume that they are correctly filled?   If anyone is looking at jPivot, the
problem seems to lie in the MondrianQueryAdapter's onExecute function.

this seems to be the only place that any change is made to the Query object:
             141: monQuery.getAxes()[iASwap(i)].setSet((Exp)
quaxes[i].genExp(doHierarchize));

but I have not a clue what it's doing here.... any ideas what's going on? If
I take the mdx output after onExecute and reinitialize the query object with
it, then all is fine. Internally something is wrong.

Thanks



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


More information about the Mondrian mailing list