Skip to content

Commit

Permalink
MONDRIAN: Disable native filters in Derby, pending Anatoly's fix. See…
Browse files Browse the repository at this point in the history
… sfbug 1379182.

[git-p4: depot-paths = "//open/mondrian/": change = 4677]
  • Loading branch information
julianhyde committed Dec 13, 2005
1 parent e7aea49 commit ff00fe5
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/main/mondrian/rolap/RolapNativeFilter.java
Expand Up @@ -25,7 +25,7 @@

/**
* computes a Filter(set, condition) in SQL
*
*
* @author av
* @since Nov 21, 2005
*/
Expand Down Expand Up @@ -93,13 +93,21 @@ NativeEvaluator createEvaluator(RolapEvaluator evaluator, FunDef fun, Exp[] args
try {
con = ds.getConnection();

// Disable filters against Derby, because its HAVING support is
// crippled. See bug 1379182.
final SqlQuery.Dialect dialect =
SqlQuery.Dialect.create(con.getMetaData());
if (dialect.isDerby()) {
return null;
}

// generate the WHERE condition
SqlQuery sqlQuery = SqlTupleReader.newQuery(con, "NativeFilter");
RolapNativeSql sql = new RolapNativeSql(sqlQuery);
String filterExpr = sql.generateFilterCondition(args[1]);
if (filterExpr == null)
if (filterExpr == null) {
return null;

}
LOGGER.info("using native filter");

TupleConstraint constraint = new FilterConstraint(cargs, evaluator, filterExpr);
Expand Down

0 comments on commit ff00fe5

Please sign in to comment.