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 3A910185B8 for ; Tue, 19 Jan 2016 15:27:40 +0000 (UTC) Received: (qmail 16553 invoked by uid 500); 19 Jan 2016 15:27:40 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 16516 invoked by uid 500); 19 Jan 2016 15:27:40 -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 16488 invoked by uid 99); 19 Jan 2016 15:27:40 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Jan 2016 15:27:40 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id E1A812C1F58 for ; Tue, 19 Jan 2016 15:27:39 +0000 (UTC) Date: Tue, 19 Jan 2016 15:27:39 +0000 (UTC) From: "Adam Holmberg (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-11004) LWT results '[applied]' column name collision 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-11004?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15106871#comment-15106871 ] Adam Holmberg commented on CASSANDRA-11004: ------------------------------------------- I see your point. Nobody ever said the names would be unique. It's a deficiency in the Python driver that will not be addressed in the current row factories that return {{dict}} or {{namedtuple}} for rows. cqlsh can be updated to use a different row factory to keep the names from colliding. > LWT results '[applied]' column name collision > --------------------------------------------- > > Key: CASSANDRA-11004 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11004 > Project: Cassandra > Issue Type: Bug > Reporter: Adam Holmberg > Priority: Minor > Fix For: 4.x > > > LWT requests return a not-well-documented single row result with a boolean {{\[applied]}} column and optional column states. > If the table happens to have a column named {{\[applied]}}, this causes a name collision. There is no error, but the {{\[applied]}} flag is not available. > {code} > cassandra@cqlsh:test> CREATE TABLE test (k int PRIMARY KEY , "[applied]" int); > cassandra@cqlsh:test> INSERT INTO test (k, "[applied]") VALUES (2, 3) IF NOT EXISTS ; > [applied] > ----------- > True > cassandra@cqlsh:test> INSERT INTO test (k, "[applied]") VALUES (2, 3) IF NOT EXISTS ; > [applied] | k > -----------+--- > 3 | 2 > {code} > I doubt this comes up much (at all) in practice, but thought I'd mention it. > One alternative approach might be to add a LWT result type ([flag|https://github.com/apache/cassandra/blob/cassandra-3.0/doc/native_protocol_v4.spec#L518-L522]) that segregates the "applied" flag information optional row results. -- This message was sent by Atlassian JIRA (v6.3.4#6332)