[ 
https://issues.apache.org/jira/browse/CASSANDRA-5810?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13720831#comment-13720831
 ] 

koray sariteke commented on CASSANDRA-5810:
-------------------------------------------

To simulate the issue, create a table at CQL as

CREATE KEYSPACE demodb WITH replication = {
  'class': 'SimpleStrategy',
  'replication_factor': '1'
};

USE demodb;
        
CREATE TABLE demo (
  colm1 double,
  colm2 double,
  colm3 double,
  PRIMARY KEY (colm1, colm2)
) WITH compression =
    { 'sstable_compression' : 'DeflateCompressor', 'chunk_length_kb' : 64 }
  AND compaction =
    { 'class' : 'LeveledCompactionStrategy',  'sstable_size_in_mb' : 10 };

Then insert values for demo 

insert into demo (colm1, colm2 , colm3) VALUES ( 
-32.0999984741211,-32.0999984741211,-32.0999984741211);

when select is performed;
cqlsh:demodb> select * from demo ;

 colm1 | colm2 | colm3
-------+-------+-------
 -32.1 | -32.1 | -32.1

By the way, when i checked at CLI
[default@unknown] use demodb;
Authenticated to keyspace: demodb
[default@demodb] list demo;
Using default limit of 100
Using default cell limit of 100
-------------------
RowKey: -32.0999984741211
=> (name=-32.0999984741211:, value=, timestamp=1374848528177000)
=> (name=-32.0999984741211:colm3, value=c0400cccc0000001, 
timestamp=1374848528177000)

row key is defined true but clustered column and value column keeps a hex value 
which i could not decode yet.
                
> Round-off problem for double values
> -----------------------------------
>
>                 Key: CASSANDRA-5810
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-5810
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>         Environment: Cassandra 1.2.6, JavaSE 1.6.0_45-b06
>            Reporter: koray sariteke
>
> When wide row column family is created, CQL rounds-off double values

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to