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 C776C18227 for ; Mon, 7 Dec 2015 20:48:14 +0000 (UTC) Received: (qmail 48306 invoked by uid 500); 7 Dec 2015 20:48:11 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 48213 invoked by uid 500); 7 Dec 2015 20:48:11 -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 48178 invoked by uid 99); 7 Dec 2015 20:48:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Dec 2015 20:48:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 070402C14F9 for ; Mon, 7 Dec 2015 20:48:11 +0000 (UTC) Date: Mon, 7 Dec 2015 20:48:11 +0000 (UTC) From: "Benjamin Lerer (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-10824) Cast functions do not work properly on Counter columns 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-10824?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15045695#comment-15045695 ] Benjamin Lerer commented on CASSANDRA-10824: -------------------------------------------- [~snazy] Could you review? > 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)