Skip to content

Commit

Permalink
[MONDRIAN-1708] Some small tweaks to the informix dialect. It now use…
Browse files Browse the repository at this point in the history
…s ANSI style nulls ordering. Plus, I've fixed the loader to load foodmart and such into the test DBs.
  • Loading branch information
lucboudreau committed Sep 10, 2013
1 parent 28175fc commit 02304d4
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/main/mondrian/spi/impl/InformixDialect.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,20 @@ public InformixDialect(Connection connection) throws SQLException {
public boolean allowsFromQuery() {
return false;
}

@Override
public String generateOrderByNulls(
String expr,
boolean ascending,
boolean collateNullsLast)
{
return generateOrderByNullsAnsi(expr, ascending, collateNullsLast);
}

@Override
public boolean supportsGroupByExpressions() {
return false;
}
}

// End InformixDialect.java
4 changes: 4 additions & 0 deletions testsrc/main/mondrian/test/DialectTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,10 @@ private String dialectize(String s) {
s = s.replace(']', '"');
s = s.replaceAll(" as ", " ");
break;
case INFORMIX:
s = s.replace("[", "");
s = s.replace("]", "");
break;
default:
s = s.replace('[', '"');
s = s.replace(']', '"');
Expand Down
3 changes: 3 additions & 0 deletions testsrc/main/mondrian/test/loader/MondrianFoodMartLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -3143,6 +3143,7 @@ private String columnValue(
case NEOVIEW:
case VECTORWISE:
case VERTICA:
case INFORMIX:
if (trimmedValue.equals("true")) {
return "1";
} else if (trimmedValue.equals("false")) {
Expand Down Expand Up @@ -3345,6 +3346,8 @@ String toPhysical(Dialect dialect) {
return "DATETIME";
case INGRES:
return "INGRESDATE";
case INFORMIX:
return "DATETIME YEAR TO FRACTION(1)";
default:
return name;
}
Expand Down

0 comments on commit 02304d4

Please sign in to comment.