Skip to content

Commit

Permalink
MONDRIAN: Fix bug 1480627, "ClassCastException using MySQL".
Browse files Browse the repository at this point in the history
[git-p4: depot-paths = "//open/mondrian/": change = 6537]
  • Loading branch information
julianhyde committed May 10, 2006
1 parent f6f8757 commit 18f82b9
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/main/mondrian/rolap/agg/Segment.java
Expand Up @@ -4,7 +4,7 @@
// Agreement, available at the following URL:
// http://www.opensource.org/licenses/cpl.html.
// Copyright (C) 2002-2002 Kana Software, Inc.
// Copyright (C) 2002-2005 Julian Hyde and others
// Copyright (C) 2002-2006 Julian Hyde and others
// All Rights Reserved.
// You must accept the terms of that agreement to use this software.
//
Expand Down Expand Up @@ -285,6 +285,15 @@ static void load(
Object o = resultSet.getObject(k++);
if (o == null) {
o = Util.nullValue; // convert to placeholder
} else if (segments[i].measure.isNumeric()) {
if (o instanceof Double) {
// nothing to do
} else if (o instanceof Number) {
o = new Double(((Number) o).doubleValue());
} else {
double d = Double.parseDouble(o.toString());
o = new Double(d);
}
}
row[arity + i] = o;
}
Expand Down

0 comments on commit 18f82b9

Please sign in to comment.