You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Kelley Reynolds (Commented) (JIRA)" <ji...@apache.org> on 2011/10/29 18:33:32 UTC

[jira] [Commented] (CASSANDRA-3421) Can create a table with DecimalType comparator but CQL explodes trying to actually use it.

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

Kelley Reynolds commented on CASSANDRA-3421:
--------------------------------------------

FYI, this is the only Type that does this, every other type appears to function properly including Float and Double
                
> Can create a table with DecimalType comparator but CQL explodes trying to actually use it.
> ------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-3421
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3421
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.0
>            Reporter: Kelley Reynolds
>              Labels: cql
>
> CREATE KEYSPACE CassandraCQLTestKeyspace WITH strategy_class='org.apache.cassandra.locator.SimpleStrategy' AND strategy_options:replication_factor=1
> USE CassandraCQLTestKeyspace
> CREATE COLUMNFAMILY comparator_cf_decimal (id text PRIMARY KEY) WITH comparator='DecimalType'
> INSERT INTO comparator_cf_decimal (id, 15.333) VALUES ('test', 'test')
> # This leads to failure
> SELECT 15.333 FROM comparator_cf_decimal WHERE id = 'test' 
> ERROR 12:22:56,909 Internal error processing execute_cql_query
> java.nio.BufferUnderflowException
> 	at java.nio.Buffer.nextGetIndex(Buffer.java:480)
> 	at java.nio.HeapByteBuffer.getInt(HeapByteBuffer.java:336)
> 	at org.apache.cassandra.cql.jdbc.JdbcDecimal.compose(JdbcDecimal.java:90)
> 	at org.apache.cassandra.db.marshal.DecimalType.compose(DecimalType.java:43)
> 	at org.apache.cassandra.db.marshal.DecimalType.compare(DecimalType.java:38)
> 	at org.apache.cassandra.db.marshal.DecimalType.compare(DecimalType.java:30)
> 	at java.util.TreeMap.getEntryUsingComparator(TreeMap.java:351)
> 	at java.util.TreeMap.getEntry(TreeMap.java:322)
> 	at java.util.TreeMap.get(TreeMap.java:255)
> 	at org.apache.cassandra.db.TreeMapBackedSortedColumns.getColumn(TreeMapBackedSortedColumns.java:138)
> 	at org.apache.cassandra.db.AbstractColumnContainer.getColumn(AbstractColumnContainer.java:128)
> 	at org.apache.cassandra.cql.QueryProcessor.process(QueryProcessor.java:627)
> 	at org.apache.cassandra.thrift.CassandraServer.execute_cql_query(CassandraServer.java:1236)
> 	at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.process(Cassandra.java:4072)
> 	at org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2889)
> 	at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:187)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> 	at java.lang.Thread.run(Thread.java:680)

--
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