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

Order() function does not work properly together with compound WHERE clause

    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.
    • Browser:
      Mozilla Firefox 3.6
    • Operating System/s:
      Ubuntu 10.04
    • QA Validation Status:
      Validated by QA
    • CI Build:
      bi-server-ee-MON33.zip(#60) dated Oct 6, 2011 9:27:15 PM

      Description

      As I've described in the community forum: http://forums.pentaho.com/showthread.php?80858-Order%28%29-funtion-does-not-work-properly-together-with-WHERE-clause&p=252813#post252813

      I have a query that has an Order() function in the definition of the ROWS axis and a WHERE clause, and the result is not sorted as it should be at first run. I think it must be a cache related problem, so it's important to test the query first with a fresh start up of the Pentaho system.

      Here's a test case against the FoodMart schema:

      select NON EMPTY

      {[Measures].[Unit Sales]}

      ON COLUMNS,
      Subset(Order([Customers].[Name].Members, [Measures].[Unit Sales], BDESC), 10.0, 30.0) ON ROWS
      from [Sales]
      where ([Time].[1997].[Q1].[2] : [Time].[1997].[Q4].[11])

        Activity

        Hide
        Julian Hyde added a comment -

        Fixed in change 14149.

        Show
        Julian Hyde added a comment - Fixed in change 14149.
        Hide
        Preethi Muppalla added a comment -

        Tested this issue on CI build dated Oct 6, 2011 9:27:15 PM bi-server-ee-MON33.zip(#60)
        Repro Path:

        • Used Foodmart.xml file.
        • Run the below query right after the start up of the Pentaho system.
        • It needs a clean cache.

        select NON EMPTY

        {[Measures].[Unit Sales]}

        ON COLUMNS,
        Subset(Order([Customers].[Name].Members, [Measures].[Unit Sales], BDESC), 10.0, 30.0) ON ROWS
        from [Sales]
        where ([Time].[1997].[Q1].[2] : [Time].[1997].[Q4].[11])

        • It shows Filter works well with the where clause in the first run.
          Please find the attached screen shot.
        Show
        Preethi Muppalla added a comment - Tested this issue on CI build dated Oct 6, 2011 9:27:15 PM bi-server-ee-MON33.zip(#60) Repro Path: Used Foodmart.xml file. Run the below query right after the start up of the Pentaho system. It needs a clean cache. select NON EMPTY {[Measures].[Unit Sales]} ON COLUMNS, Subset(Order( [Customers] . [Name] .Members, [Measures] . [Unit Sales] , BDESC), 10.0, 30.0) ON ROWS from [Sales] where ( [Time] . [1997] . [Q1] . [2] : [Time] . [1997] . [Q4] . [11] ) It shows Filter works well with the where clause in the first run. Please find the attached screen shot.

          People

          • Assignee:
            Preethi Muppalla
            Reporter:
            György Novák
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: