You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Benjamin Lerer (JIRA)" <ji...@apache.org> on 2015/12/07 21:48:10 UTC

[jira] [Updated] (CASSANDRA-10824) Cast functions do not work properly on Counter columns

     [ https://issues.apache.org/jira/browse/CASSANDRA-10824?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Lerer updated CASSANDRA-10824:
---------------------------------------
    Attachment: 10824-trunk.txt

The unit test results are [here|http://cassci.datastax.com/view/Dev/view/blerer/job/blerer-10824-trunk-testall/1/] and the dtest results are [here|http://cassci.datastax.com/view/Dev/view/blerer/job/blerer-10824-trunk-dtest/2/.]

> Cast functions do not work properly on Counter columns
> ------------------------------------------------------
>
>                 Key: CASSANDRA-10824
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-10824
>             Project: Cassandra
>          Issue Type: Bug
>          Components: CQL
>            Reporter: Benjamin Lerer
>            Assignee: Benjamin Lerer
>             Fix For: 3.x
>
>         Attachments: 10824-trunk.txt
>
>
> The problem can be reproduced with the following unit test:
> {code}
>     @Test
>     public void testCounterCastsInSelectionClause() throws Throwable
>     {
>         createTable("CREATE TABLE %s (a int primary key, b counter)");
>         execute("UPDATE %s SET b = b + 2 WHERE a = 1");
>         assertRows(execute("SELECT CAST(b AS tinyint), " +
>                 "CAST(b AS smallint), " +
>                 "CAST(b AS int), " +
>                 "CAST(b AS bigint), " +
>                 "CAST(b AS float), " +
>                 "CAST(b AS double), " +
>                 "CAST(b AS decimal), " +
>                 "CAST(b AS ascii), " +
>                 "CAST(b AS text) FROM %s"),
>                    row((byte) 2, (short) 2, 2, 2L, 2.0F, 2.0, BigDecimal.valueOf(2.0), "2", "2"));
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)