Uploaded image for project: 'Pentaho Analysis - Mondrian'
  1. Pentaho Analysis - Mondrian
  2. MONDRIAN-506

Native evaluation not occurring when arguments are sets

    XMLWordPrintable

    Details

    • Notice:
      When an issue is open, the "Fix Version/s" field conveys a target, not necessarily a commitment. When an issue is closed, the "Fix Version/s" field conveys the version that the issue was fixed in.
    • Closer:
      nobody

      Description

      The following is an example of an MDX which has sets specified as arguments for a NonEmptyCrossJoin which is not evaluated natively

      select NonEmptyCrossJoin(

      {Descendants([Customers].[All Customers].[USA], 2)}

      ,

      {[Product].[All Products].Children}

      )
      on rows from [Sales]

      It appears that this MDX is not evaluated natively because

      1) the arguments in the NonEmptyCrossJoin are explicitly defined as sets (with {}).
      2) the depth argument in the Descendants function is not an actual level

      If I change the MDX to the following it is evaluated natively:

      select NonEmptyCrossJoin(Descendants([Customers].[All Customers].[USA], [City]), [Product].[All Products].Children)
      on rows from [Sales]

      Since these MDX statements are the same for the most part the expectation would be that both would be evaluated natively. I believe this can be accomplished with some minor changes to the RolapNativeSet class. The change would involve introducing a checkSet() method that would:

      1) there is only one argument in the set
      2) the argument is a instance of a ResolvedFunCall (indicates it is a function)

      If both of these cases is true then the argument in the set would be checked to see if it can be evaluated natively. Also a change can be made to the Descendants check to verify that the depth value actually corresponds to a valid level in order for it to be processed natively.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              rthar rthar
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: