[Mondrian] SqlTupleReader.readTuples generates huge IN list causing java.sql.SQLException
Julian Hyde
julianhyde at speakeasy.net
Thu Jul 12 01:12:59 EDT 2007
> Robin Tharappel wrote:
>
> We tried setting the maxConstraints = 100 however the same
> error occurred. It looks like this issue is caused in part by
> the large volume dimension at the parent level (200,000).
>
> There appears to be some code that results in the in clause
> not to be created (from Mondrian 2.2.2 source for class
> SqlConstraintUtil):
>
> ColumnConstraint[] cc = getColumnConstraints(c);
>
> if (!strict && cc.length >=
> MondrianProperties.instance().MaxConstraints.get()){
> // Simply get them all, do not create where-clause.
> // Below are two alternative approaches (and
> code). They
> // both have problems.
>
> } else {
> String cond =
> RolapStar.Column.createInExpr(q, cc, level.isNumeric());
> sqlQuery.addWhere(cond);
> }
> if (level.isUnique()) {
> break; // no further qualification needed
> }
> In our case the number of ColumnConstraints (200,000) exceeds
> the max constraint property (100), however the strict
> variable is always true.
> Under what circumstances would this be false? We also tried Mondrian
> 2.3.2 but received the same error.
I would approach this by running the code in the debugger. The simplest
explanation is that the code below is not hit - because this code is part of
the semi-join generation to implement non-empty.
I would do this if I had time and a reproducible testcase but right now I
don't have either. :)
Julian
More information about the Mondrian
mailing list