[Mondrian] Some SQL points

Julian Hyde jhyde at pentaho.com
Mon Mar 16 02:29:12 EDT 2009


> Stefan wrote:
> Think that file is too big for the mailinglist.

First off, there are miscellaneous errors in DialectTest. As I have said
before, you need to get mondrian in sync with what your database is capable
of. Fix MonetDbDialect (or possibly DialectTest) to get rid of these errors
before you try to fix anything else.

A huge number of the remaining errors have the following underlying cause:

Caused by: java.sql.SQLException: [unixODBC][Driver Manager]Invalid cursor
state
    at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6957)

I think that means that MonetDB (or perhaps the ODBC driver) failed while
executing the statement. It seems to have trouble with star queries, of the
general form "Select ... From ... Join ... Group by", that mondrian uses to
fetch cell values. This is typical:

     [java] Caused by: mondrian.olap.MondrianException: Mondrian
Error:Internal error: Error while loading segment; sql=[select
"store"."store_state" as "c0", "store"."store_city" as "c1",
"time_by_day"."the_year" as "c2", sum("sales_fact_1997"."unit_sales") as
"m0" from "store" as "store", "sales_fact_1997" as "sales_fact_1997",
"time_by_day" as "time_by_day" where "sales_fact_1997"."store_id" =
"store"."store_id" and "store"."store_state" = 'CA' and "store"."store_city"
= 'Alameda' and "sales_fact_1997"."time_id" = "time_by_day"."time_id" and
"time_by_day"."the_year" = 1997 group by "store"."store_state",
"store"."store_city", "time_by_day"."the_year"]

Might be a bug in MonetDB there.

Once you've fixed those, focus on some straightforward queries. I wouldn't
spend time at this stage trying to fix the
queryTest_....xml(mondrian.test.comp.ResultComparatorTest) tests that
produce a huge amount of output. Aim to get, say, BasicQueryTest working,
and the rest should follow quite easily.

Julian





More information about the Mondrian mailing list