cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From " Brian Hess (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-9550) Support fixed precision data type
Date Thu, 04 Jun 2015 21:24:38 GMT


 Brian Hess commented on CASSANDRA-9550:

There is a difference between arbitrary precision numbers (namely BigDecimal) and fixed precision
numbers (namely SQL's NUMERIC).  Are you suggesting that we use DECIMAL in C* instead of NUMERIC(p,s)
in SQL systems?  

The fixed precision is frequently needed in SQL - especially in financial situations (which
we specifically call out in the C* docs).  Scaling by a factor in the app does not work well
with the advent of UDFs and UDAs.  For example, the scale changes on multiplication and division,
and without NUMERIC(p,s) you would not be able to convey that the scale changed.

> Support fixed precision data type
> ---------------------------------
>                 Key: CASSANDRA-9550
>                 URL:
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter:  Brian Hess
> SQL databases support a fixed precision data type.  When converting data models from
SQL DBs to Cassandra, the choices are not clear.  DOUBLE or FLOAT are possibilities, but with
UDFs and Aggregates this is actually a lot less clear, as you really do need fixed precision
arithmetic.  That is, one flaw with floating-point math is that the order of the operations
can change the final result.  That is not an issue with fixed precision arithmetic (though
other trade-offs are there).

This message was sent by Atlassian JIRA

View raw message