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 2DB39187C1 for ; Mon, 25 Apr 2016 02:54:13 +0000 (UTC) Received: (qmail 73193 invoked by uid 500); 25 Apr 2016 02:54:13 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 73152 invoked by uid 500); 25 Apr 2016 02:54: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 73140 invoked by uid 99); 25 Apr 2016 02:54:12 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Apr 2016 02:54:12 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id D2BDA2C1F54 for ; Mon, 25 Apr 2016 02:54:12 +0000 (UTC) Date: Mon, 25 Apr 2016 02:54:12 +0000 (UTC) From: "Stefania (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-11631) cqlsh COPY FROM fails for null values with non-prepared statements 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-11631?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15255811#comment-15255811 ] Stefania commented on CASSANDRA-11631: -------------------------------------- Thanks for the patch, I've backported it and enhanced it to cover composite types and better error reporting: ||2.1||2.2||3.0||trunk|| |[patch|https://github.com/stef1927/cassandra/commits/11631-2.1]|[patch|https://github.com/stef1927/cassandra/commits/11631-2.2]|[patch|https://github.com/stef1927/cassandra/commits/11631-3.0]|[patch|https://github.com/stef1927/cassandra/commits/11631]| |[dtest|http://cassci.datastax.com/view/Dev/view/stef1927/job/stef1927-11631-2.1-dtest/]|[dtest|http://cassci.datastax.com/view/Dev/view/stef1927/job/stef1927-11631-2.2-dtest/]|[dtest|http://cassci.datastax.com/view/Dev/view/stef1927/job/stef1927-11631-3.0-dtest/]|[dtest|http://cassci.datastax.com/view/Dev/view/stef1927/job/stef1927-11631-dtest/]| Here are the new tests: https://github.com/riptano/cassandra-dtest/pull/949 Inserting {{None}} values in collections, e.g. lists, resulted in server side assertion errors. [~snazy] could you review the final patch and do you think we should do anything about empty values in collections (like ignoring them) or is a parse error indicating the problematic field sufficient? > cqlsh COPY FROM fails for null values with non-prepared statements > ------------------------------------------------------------------ > > Key: CASSANDRA-11631 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11631 > Project: Cassandra > Issue Type: Bug > Reporter: Robert Stupp > Assignee: Stefania > Priority: Minor > Fix For: 2.1.x > > > cqlsh's {{COPY FROM ... WITH PREPAREDSTATEMENTS = False}} fails if the row contains null values. Reason is that the {{','.join(r)}} in {{make_non_prepared_batch_statement}} doesn't seem to handle {{None}}, which results in this error message. > {code} > Failed to import 1 rows: TypeError - sequence item 2: expected string, NoneType found, given up without retries > {code} > Attached patch should fix the problem. -- This message was sent by Atlassian JIRA (v6.3.4#6332)