Pentaho Analysis - Mondrian
  1. Pentaho Analysis - Mondrian
  2. MONDRIAN-678

VisualTotals gives UnsupportedOperationException calling getOrdinal

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Unknown Unknown
    • Resolution: Fixed
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Sergey Mazin writes:

      Queries using DrilldownMember function in VisualTotals function fail.
      Example of query generated by Excel 2007:

      WITH SET [XL_Row_Dim_0] as 'VisualTotals(Distinct(Hierarchize({
      Ascendants([Customers].[All Customers].[USA].[CA].[Beverly Hills].[Ari
      Tweten]),
      Descendants([Customers].[All Customers].[USA].[CA].[Beverly Hills].[Ari
      Tweten]),
      Ascendants([Customers].[All Customers].[Mexico]),
      Descendants([Customers].[All Customers].[Mexico])
      })))'
      select NON EMPTY
      Hierarchize(Intersect(DrilldownMember({{DrilldownMember({{DrilldownLevel({[C
      ustomers].[All Customers]})}}, {[Customers].[All Customers].[USA]})}},
      {[Customers].[All Customers].[USA].[CA]}), [XL_Row_Dim_0])) DIMENSION
      PROPERTIES PARENT_UNIQUE_NAME ON COLUMNS
      from [Sales]
      where [Measures].[Unit Sales]

           [java] at mondrian.resource.MondrianResource$_Def0.ex(MondrianResource.java:816)
           [java] at mondrian.olap.Util.newInternal(Util.java:1492)
           [java] at mondrian.olap.Util.newError(Util.java:1508)
           [java] at mondrian.rolap.RolapConnection.execute(RolapConnection.java:636)
           [java] at mondrian.test.TestContext.executeQuery(TestContext.java:510)
           [java] at mondrian.test.TestContext.assertQueryReturns(TestContext.java:1037)
           [java] at mondrian.test.FoodMartTestCase.assertQueryReturns(FoodMartTestCase.java:125)
           [java] at mondrian.olap.fun.FunctionTest.testVisualTotalsWithNamedSetAndPivotSameAxis(FunctionTest.java:10076)
           [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           [java] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
           [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
           [java] at mondrian.test.MondrianTestRunner$2.run(MondrianTestRunner.java:139)
           [java] at java.lang.Thread.run(Unknown Source)
           [java] Caused by: java.lang.UnsupportedOperationException
           [java] at mondrian.olap.fun.VisualTotalsFunDef$VisualTotalMember.getOrdinal(VisualTotalsFunDef.java:246)
           [java] at mondrian.olap.fun.FunUtil.compareSiblingMembers(FunUtil.java:1858)
           [java] at mondrian.olap.fun.FunUtil.compareHierarchically(FunUtil.java:1810)
           [java] at mondrian.olap.fun.FunUtil$HierarchizeComparator.compare(FunUtil.java:2862)
           [java] at mondrian.olap.fun.FunUtil$HierarchizeComparator.compare(FunUtil.java:1)
           [java] at java.util.Arrays.mergeSort(Unknown Source)
           [java] at java.util.Arrays.sort(Unknown Source)
           [java] at java.util.Collections.sort(Unknown Source)
           [java] at mondrian.olap.fun.FunUtil.hierarchizeMemberList(FunUtil.java:739)
           [java] at mondrian.olap.fun.HierarchizeFunDef$1.evaluateMemberList(HierarchizeFunDef.java:56)
           [java] at mondrian.calc.impl.AbstractExpCompiler$MemberListIterCalc.evaluateMemberIterable(AbstractExpCompiler.java:597)
           [java] at mondrian.calc.impl.AbstractMemberIterCalc.evaluate(AbstractMemberIterCalc.java:52)
           [java] at mondrian.rolap.RolapResult.executeAxis(RolapResult.java:732)
           [java] at mondrian.rolap.RolapResult.evalLoad(RolapResult.java:575)
           [java] at mondrian.rolap.RolapResult.loadMembers(RolapResult.java:541)
           [java] at mondrian.rolap.RolapResult.<init>(RolapResult.java:273)
           [java] at mondrian.rolap.RolapConnection.execute(RolapConnection.java:607)
           [java] ... 20 more

        Activity

        Hide
        Julian Hyde added a comment -
        Fixed in change 13334 on 3.2 branch.
        Show
        Julian Hyde added a comment - Fixed in change 13334 on 3.2 branch.

          People

          • Assignee:
            Julian Hyde
            Reporter:
            Julian Hyde
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: