cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "paul cannon (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-3016) CQL: double and float types do not seem to work properly
Date Thu, 13 Oct 2011 22:10:12 GMT

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

paul cannon commented on CASSANDRA-3016:
----------------------------------------

Yes, still a problem.
                
> CQL: double and float types do not seem to work properly
> --------------------------------------------------------
>
>                 Key: CASSANDRA-3016
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3016
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Matt Hollingsworth
>            Assignee: paul cannon
>
> Was asked to make this from the mailing list by Jonathan Ellis.
> I'm just getting started with CQL, and decided to do a simple test create/insert/select
thing to check that everything was working.  Most everything seems to work, but it appears
that double/floats do not work properly.  Here's what I did:
> test.cql
> --------------------------
> CREATE KEYSPACE test with strategy_class = 'SimpleStrategy' and strategy_options:replication_factor=1;
> USE test;
> CREATE COLUMNFAMILY testvals (
>     key varchar PRIMARY KEY,
>     value float
>    );
> INSERT INTO testvals (key,value) VALUES ('k1',341.32355);
> SELECT key, value FROM testvals;
> --------------------------
> The output is this:
> cqlsh localhost < scripts/test.cql
>  key |    value |
>   k1 | @uU-B??? |
> Same thing happens when I do value double.  I also tried to do this from the python driver,
gives the same weirdness:
> In [2]: import cql
> In [3]: con = cql.connect("localhost",keyspace="test")
> In [4]: cursor = con.cursor()
> In [5]: cursor.execute("SELECT * from testvals")
> Out[5]: True
> In [6]: for r in cursor: print r
>    ...: 
> [u'k1', '?\xf8\x00\x00\x00\x00\x00\x00']

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message