[Mondrian] JPivot re-write generates Mondrian bug

Richard Emberson remberson at edgedynamics.com
Thu Jan 3 14:40:24 EST 2008


Mondrian Version:
Title: mondrian
Version: 2.4.2.9831
Vendor: Pentaho


Via JPivot query re-writing, what seems to be valid MDX
generates a Mondrian Error:

This is for a private schema and dataset.

Steps:

1) In JPivot execute MDX.
2) Then add "Store" dimension to the “Rows” and click “OK”.
3) When the view re-populates, click on the “+” to expand the “All Stores”

Result:

Caused by: mondrian.olap.MondrianException: Mondrian Error:Internal error:
Error while executing query
[select {[Time].[All Time]} ON COLUMNS,
   Hierarchize(Union(
     Crossjoin(
         {[Product].[All Products]},
         {[Store].[All Stores]}),
     Crossjoin(
         {[Product].[All Products]},
         [Store].[All Stores].Children)
     )) ON ROWS
from [Store Shipments]
where [Measures].[Value]
        at
mondrian.resource.MondrianResource$_Def0.ex(MondrianResource.java:755)
        at mondrian.olap.Util.newInternal(Util.java:1175)
        at mondrian.olap.Util.newError(Util.java:1191)
        at mondrian.rolap.RolapConnection.execute(RolapConnection.java:445)
        at 
com.tonbeller.jpivot.mondrian.MondrianModel.getResult(MondrianModel.java:280)
        ... 37 more
Caused by: mondrian.olap.MondrianException: Mondrian Error:Internal error:
assert failed
        at 
mondrian.resource.MondrianResource$_Def0.ex(MondrianResource.java:752)
        at mondrian.olap.Util.newInternal(Util.java:1168)
        at mondrian.olap.Util.assertTrue(Util.java:1149)
        at 
mondrian.olap.fun.FunUtil$HierarchizeArrayComparator.compare(FunUtil.java:2155)
        at 
mondrian.olap.fun.FunUtil$ArrayComparator.compare(FunUtil.java:2014)
        at java.util.Arrays.mergeSort(Arrays.java:1284)
        at java.util.Arrays.mergeSort(Arrays.java:1295)
        at java.util.Arrays.mergeSort(Arrays.java:1296)
        at java.util.Arrays.mergeSort(Arrays.java:1296)
        at java.util.Arrays.mergeSort(Arrays.java:1296)
        at java.util.Arrays.mergeSort(Arrays.java:1296)
        at java.util.Arrays.mergeSort(Arrays.java:1295)
        at java.util.Arrays.sort(Arrays.java:1223)
        at java.util.Collections.sort(Collections.java:159)
        at mondrian.olap.fun.FunUtil.hierarchize(FunUtil.java:520)
        at 
mondrian.olap.fun.HierarchizeFunDef$1.evaluateList(HierarchizeFunDef.java:49)
        at 
mondrian.calc.impl.AbstractListCalc.evaluate(AbstractListCalc.java:67)
        at mondrian.rolap.RolapResult.executeAxis(RolapResult.java:690)
        at mondrian.rolap.RolapResult.evalLoad(RolapResult.java:559)
        at mondrian.rolap.RolapResult.loadMembers(RolapResult.java:534)
        at mondrian.rolap.RolapResult.<init>(RolapResult.java:256)
        at mondrian.rolap.RolapConnection.execute(RolapConnection.java:417)
        ... 38 more


Line numbers might vary depending upon Mondrian version but
we have seen this error when combining Hierarchize, Union
and Crossjoin for various versions of Mondrian.

Has anyone else ever seen this kind of error, a stack with
multiple Arrays.mergeSort method calls being called from
FunUtil.hierarchize and ending in
FunUtil$HierarchizeArrayComparator.compare
where
Util.assertTrue(m1.equals(m2));
is not true?




Richard

-- 
Quis custodiet ipsos custodes:
This email message is for the sole use of the intended recipient(s) and
may contain confidential information.  Any unauthorized review, use,
disclosure or distribution is prohibited.  If you are not the intended
recipient, please contact the sender by reply email and destroy all
copies of the original message.



More information about the Mondrian mailing list