Getting error for decimal type data type
DB Name: Cassandra DB Versions: latest
Feature Description: Support DecimalType with BigDecimal
Currently, it seems that BigDecimals get truncated into integers. It would be nice if BigDecimals could be stored as Cassandra DecimalTypes (decimal in cql).
I tried but not able to reproduce it.
you may want to try, here is available test case:- https://github.com/impetus-opensource/Kundera/blob/trunk/kundera-cassandra/src/test/java/com/impetus/client/crud/datatypes/StudentCassandraTest.java
Thanks Kuldeep
In that example, your BigDecimal is set to 123456789. You use this column definition for the BigDecimal:
{column_name: BIG_DECIMAL, validation_class:IntegerType, index_type: KEYS}
If you use something like 1234.56789, only the value 1234 will be persisted. It would make more sense to use this column definition:
{column_name: BIG_DECIMAL, validation_class:DecimalType, index_type: KEYS}
Kuldeep, Please verify. I guess this is what we tried as another example:
{column_name: BIG_DECIMAL, validation_class:DecimalType, index_type: KEYS}
-Vivek
It was an issue. Fixed, please verify.
-Vivek
Fixed with 2.3.1 patch release.(released today).
Fixed and releasing with 2.6. Please verify. -Vivek