[Mondrian] PC hierarchy and visibility of MemberReader and MemberSource
damien.hostin at axege.com
Tue Nov 27 06:15:12 EST 2012
I am trying to use parent-child hierarchy, but it has some restriction.
It looks like we need to give a list sorted in such a way that parent
always come before their child, even if we are not using Closure Tables.
But in the same time, an order by clause is generated on the parent and
the child column.
In foodmart.xml it is OK because parent and child are integer, and
sorted correctly. It is also OK because the hierarchy is always the
same, there is no real-life end user that modify it.
In my case, sorting the hierarchy on parent and child doesn't garanted
to give mondrian the correct order. This can't work but it is possible
to change the code. I could have patch mondrian to handle PC hierarchies
with my "custom" order by clause, but regression tests find 35 failures
and 1 error with original code running with derby.
As it is possible the give MemberReader or MemberSource own
implementation I decided to use that cleaner way. But
mondrian.rolap.MemberSource uses a MemberCache class that is not visible
outside mondrian's package, and mondrian.rolap.MemberReader is package
visible too. So I must implements my custom MemberReader/Source inside
mondrian project, with my 36 regression.
Is it a volunteer restriction or can the visibility be change to allow
outside implementation ? I'm a bit messy with those problems.
More information about the Mondrian