[Mondrian] distinct-count and explicit aggregate table recognition

Julian Hyde jhyde at pentaho.com
Mon Jan 7 03:19:02 EST 2013


The easiest way to approach this is to look at the SQL Mondrian is generating. Is it asking the right question of the DBMS?

Can you turn on SQL tracing and post the log you get during the run that produces the incorrect results.

Julian


On Jan 7, 2013, at 12:10 AM, Tomasz Karlik <tkarlik at gmail.com> wrote:

> I am getting different results while running simple query on FoodMart
> (PostgreSql db). Result differs and seems to be wrong when using
> explicit aggregate. I've created simple test which shows this
> behavior. Also I've made some patch, but i'm not sure if the problem
> is in sources? The problem doesn't appear when aggregate table is
> recognized by the default rules.
> 
> query:
> 
> select
> 
> NON EMPTY {[Measures].[Customer Count]} ON COLUMNS,
> 
> NON EMPTY {[Time].[Year].Members} ON ROWS
> 
> from [Sales]
> 
> aggregate table: agg_c_10_sales_fact_1997
> 
> 
> expected result:
> 
> Axis #0:
> 
> {}
> 
> Axis #1:
> 
> {[Measures].[Customer Count]}
> 
> Axis #2:
> 
> {[Time].[1997]}
> 
> Row #0: 5 581
> 
> 
> actual result:
> 
> Axis #0:
> 
> {}
> 
> Axis #1:
> 
> {[Measures].[Customer Count]}
> 
> Axis #2:
> 
> {[Time].[1997]}
> 
> Row #0: 16 947
> <ExplicitRecognizerTest.java><mondrian_rolap_aggmatcher_Recognizer.java.patch>_______________________________________________
> Mondrian mailing list
> Mondrian at pentaho.org
> http://lists.pentaho.org/mailman/listinfo/mondrian



More information about the Mondrian mailing list