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 BAABA18B78 for ; Mon, 12 Oct 2015 19:00:18 +0000 (UTC) Received: (qmail 62695 invoked by uid 500); 12 Oct 2015 19:00:07 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 62666 invoked by uid 500); 12 Oct 2015 19:00:07 -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 62652 invoked by uid 99); 12 Oct 2015 19:00:07 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Oct 2015 19:00:07 +0000 Date: Mon, 12 Oct 2015 19:00:07 +0000 (UTC) From: "Benjamin Lerer (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-10263) Insert in Cassandra in a collection, values with single quote MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-10263?page=3Dcom.atla= ssian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId= =3D14953569#comment-14953569 ]=20 Benjamin Lerer commented on CASSANDRA-10263: -------------------------------------------- Cassandra returns the collection values without quotes. Therefore, if you r= etrieve the values from a driver they will not contains double quotes. {{cqlsh}} print the collection values {{quoted}} and by consequence also es= cape the single quotes. The behavior might be surprising but it is the expected one. > Insert in Cassandra in a collection, values with single quote > ------------------------------------------------------------- > > Key: CASSANDRA-10263 > URL: https://issues.apache.org/jira/browse/CASSANDRA-1026= 3 > Project: Cassandra > Issue Type: Bug > Reporter: Jduarte > Assignee: Benjamin Lerer > Attachments: terminal.png > > > I think there is a problem with single quotes in collection fields. This = is what I try: > Table: {{CREATE TABLE test (name text, foo map, PRIMARY KEY(na= me));}} > Insert: {code}INSERT INTO test (name, foo) VALUES ( 'jos''emy',{'foo':'j= osemy''s hou=C3=B1se'});{code} > Query: {{SELECT * FROM test;}} > {code} > name | foo > -----------+----------------------------- > jos'emy | {'foo': 'josemy''s hou=C3=B1se'} > {code} > As you can see, Cassandra replace the double quote in the simple "name" f= ield, but does not replace the quotes in the field inside the map. The resu= lt (I think) should be: > {code} > name | foo > ---------+----------------------------- > jos'emy | {'foo': 'josemy's hou=C3=B1se'} > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)