Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B00D1200AE8 for ; Tue, 3 May 2016 10:56:14 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id AE9411609F3; Tue, 3 May 2016 10:56:14 +0200 (CEST) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 08E6E1609F2 for ; Tue, 3 May 2016 10:56:13 +0200 (CEST) Received: (qmail 88847 invoked by uid 500); 3 May 2016 08:56:13 -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 88832 invoked by uid 99); 3 May 2016 08:56:13 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 May 2016 08:56:13 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id CF12A2C1F5C for ; Tue, 3 May 2016 08:56:12 +0000 (UTC) Date: Tue, 3 May 2016 08:56:12 +0000 (UTC) From: "Alex Petrov (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (CASSANDRA-9842) Inconsistent behavior for '= null' conditions on static columns MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 03 May 2016 08:56:14 -0000 [ https://issues.apache.org/jira/browse/CASSANDRA-9842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15232315#comment-15232315 ] Alex Petrov edited comment on CASSANDRA-9842 at 5/3/16 8:55 AM: ---------------------------------------------------------------- As discussed with [~slebresne] offline, it was agreed that there's no distinction between the non-existing row and a static column containing {{null}} value, so both an update to non-existing row and row with null in static column will succeed. Inconsistent behaviour is only in {{2.1}} and {{2.2}}, although I've added same tests to {{3.0}} and {{trunk}}. || ||2.1||2.2||3.0||trunk| ||code|[2.1|https://github.com/ifesdjeen/cassandra/tree/9842-2.1]|[2.2|https://github.com/ifesdjeen/cassandra/tree/9842-2.2]|[3.0|https://github.com/ifesdjeen/cassandra/tree/9842-3.0]|[trunk|https://github.com/ifesdjeen/cassandra/tree/9842-trunk]| ||utest|[2.1|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-9842-2.1-testall/]|[2.2|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-9842-2.2-testall/]|[3.0|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-9842-3.0-testall/]|[trunk|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-9842-trunk-testall/]| ||dtest|[2.1|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-9842-2.1-dtest/]|[2.2|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-9842-2.2-dtest/]|[3.0|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-9842-3.0-dtest/]|[trunk|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-9842-trunk-dtest/]| was (Author: ifesdjeen): To sum up, there's no distinction between the non-existing row and a static column containing {{null}} value, so both an update to non-existing row and row with null in static column will succeed. Inconsistent behaviour is only in {{2.1}} and {{2.2}}, although I've added same tests to {{3.0}} and {{trunk}}. || ||2.1||2.2||3.0||trunk| ||code|[2.1|https://github.com/ifesdjeen/cassandra/tree/9842-2.1]|[2.2|https://github.com/ifesdjeen/cassandra/tree/9842-2.2]|[3.0|https://github.com/ifesdjeen/cassandra/tree/9842-3.0]|[trunk|https://github.com/ifesdjeen/cassandra/tree/9842-trunk]| ||utest|[2.1|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-9842-2.1-testall/]|[2.2|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-9842-2.2-testall/]|[3.0|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-9842-3.0-testall/]|[trunk|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-9842-trunk-testall/]| ||dtest|[2.1|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-9842-2.1-dtest/]|[2.2|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-9842-2.2-dtest/]|[3.0|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-9842-3.0-dtest/]|[trunk|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-9842-trunk-dtest/]| > Inconsistent behavior for '= null' conditions on static columns > --------------------------------------------------------------- > > Key: CASSANDRA-9842 > URL: https://issues.apache.org/jira/browse/CASSANDRA-9842 > Project: Cassandra > Issue Type: Bug > Environment: cassandra-2.1.8 on Ubuntu 15.04 > Reporter: Chandra Sekar > Assignee: Alex Petrov > Fix For: 2.1.x, 2.2.x, 3.0.x, 3.x > > > Both inserting a row (in a non-existent partition) and updating a static column in the same LWT fails. Creating the partition before performing the LWT works. > h3. Table Definition > {code} > create table txtable(pcol bigint, ccol bigint, scol bigint static, ncol text, primary key((pcol), ccol)); > {code} > h3. Inserting row in non-existent partition and updating static column in one LWT > {code} > begin batch > insert into txtable (pcol, ccol, ncol) values (1, 1, 'A'); > update txtable set scol = 1 where pcol = 1 if scol = null; > apply batch; > [applied] > ----------- > False > {code} > h3. Creating partition before LWT > {code} > insert into txtable (pcol, scol) values (1, null) if not exists; > begin batch > insert into txtable (pcol, ccol, ncol) values (1, 1, 'A'); > update txtable set scol = 1 where pcol = 1 if scol = null; > apply batch; > [applied] > ----------- > True > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)