Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6B9E011088 for ; Fri, 25 Apr 2014 21:37:24 +0000 (UTC) Received: (qmail 42661 invoked by uid 500); 25 Apr 2014 21:37:20 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 42625 invoked by uid 500); 25 Apr 2014 21:37:17 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 42539 invoked by uid 99); 25 Apr 2014 21:37:16 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Apr 2014 21:37:16 +0000 Date: Fri, 25 Apr 2014 21:37:16 +0000 (UTC) From: "Brandon Williams (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (CASSANDRA-7095) Cqlsh reads floats and doubles with added non-trivial precision MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-7095?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brandon Williams reassigned CASSANDRA-7095: ------------------------------------------- Assignee: Mikhail Stepura > Cqlsh reads floats and doubles with added non-trivial precision > --------------------------------------------------------------- > > Key: CASSANDRA-7095 > URL: https://issues.apache.org/jira/browse/CASSANDRA-7095 > Project: Cassandra > Issue Type: Bug > Components: Tools > Environment: Ubuntu 12.04.3 > Python 2.7.3 > Reporter: Andrew Spitzer > Assignee: Mikhail Stepura > > I found that on Cqlsh v. 4.1.1 and Cassandra 2.0.6.28 when I inserted value into float or double column, "select" returned a slightly different value > If cqlsh returns with only a low level precision, this does not show: > {code} > cqlsh> create KEYSPACE test WITH replication = {'class': 'SimpleStrategy', 'replication_factor':1}; > cqlsh> use test ; > cqlsh:test> create table testing (a int PRIMARY KEY , b float); > cqlsh:test> INSERT INTO testing (a, b ) VALUES ( 1, 2.0002); > cqlsh:test> select * FROM testing ; > a | b > ---+-------- > 1 | 2.0002 > {code} > But if precision is increased, for example, 20 digits: > {code} > cqlsh> SELECT * FROM test.testing ; > a | b > ---+----------------------- > 1 | 2.0002000331878662109 > {code} > Using sstable2json, one sees that this issue is with cqlsh, the actual data is the value inserted: > {code} > sstable2json /var/lib/cassandra/data/test/testing/test-testing-jb-1-Data.db > [ > {"key": "00000001","columns": [["","",1398459775180000], ["b","2.0002",1398459775180000]]} > ] > {code} -- This message was sent by Atlassian JIRA (v6.2#6252)