[Mondrian] [Fwd: Eigenbase perforce change 9873 for review]
Julian Hyde
julianhyde at speakeasy.net
Wed Sep 12 02:08:54 EDT 2007
> Rushan's change below is checked in as LucidDB-specific, but
> according
> to SQL:2003, generating exponential literal format for
> double-precision
> values should always be the right thing to do, since without an
> exponent, the DBMS is supposed to interpret the literal as a
> fixed-point
> value.
>
> In cases like this, is it preferable to "not rock the boat" by making
> the change LucidDB-specific? The alternative is to change
> Mondrian to
> make it expect SQL:2003 behavior from the DBMS by default, and change
> other dialects as needed (e.g. if a DBMS does not support the
> standard
> exponential format).
>
> (Don't ask why anyone would be crazy enough to use
> floating-point values
> as member keys in the first place.)
The dubious thing in Rushan's change is the assumption that a Double value
in java maps to a DOUBLE column in SQL. The datatype of the value in java
depends as much on the JDBC driver as anything. I guess the driver should
use BigDecimal for fixed-point values, but many of them use Double instead.
I wouldn't think it is safe to extend this assumption to other databases and
JDBC drivers, so the prudent thing is to keep this as a LucidDB-specific
change.
Julian
More information about the Mondrian
mailing list