You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jduarte (JIRA)" <ji...@apache.org> on 2015/09/03 20:54:45 UTC

[jira] [Updated] (CASSANDRA-10263) Insert in Cassandra in a collection, values with single quote

     [ https://issues.apache.org/jira/browse/CASSANDRA-10263?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jduarte updated CASSANDRA-10263:
--------------------------------
    Description: 
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<text,text>, PRIMARY KEY(name));

Insert:  INSERT INTO test (name, foo) VALUES ( 'jos''emy',{'foo':'josemy''s houñse'});

Query:  SELECT * FROM  test;

 name    | foo
---------+-----------------------------
 jos'emy | {'foo': 'josemy''s houñse'}

As you can see, Cassandra replace the double quote in the simple "name" field, but does not replace the quotes in the field inside the map. The result (I think) should be:

 name    | foo
---------+-----------------------------
 jos'emy |   {'foo': 'josemy's houñse'}

  was:
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<text,text>, PRIMARY KEY(name));

Insert:  INSERT INTO test (name, foo) VALUES ( 'jos''emy',{'foo':'josemy''s houñse'});

Query:  SELECT * FROM  test;

 name    | foo
---------+-----------------------------
 jos'emy | {'foo': 'josemy''s houñse'}

As you can see, Cassandra replace the double quote in the simple "name" field, but does not replace the quotes in the field inside the map. The result (I think) should be:

 name    | foo
---------+-----------------------------
 jos'emy | {'foo': 'josemy's houñse'}


> Insert in Cassandra in a collection, values with single quote
> -------------------------------------------------------------
>
>                 Key: CASSANDRA-10263
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-10263
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Jduarte
>             Fix For: 2.2.1
>
>         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<text,text>, PRIMARY KEY(name));
> Insert:  INSERT INTO test (name, foo) VALUES ( 'jos''emy',{'foo':'josemy''s houñse'});
> Query:  SELECT * FROM  test;
>  name    | foo
> ---------+-----------------------------
>  jos'emy | {'foo': 'josemy''s houñse'}
> As you can see, Cassandra replace the double quote in the simple "name" field, but does not replace the quotes in the field inside the map. The result (I think) should be:
>  name    | foo
> ---------+-----------------------------
>  jos'emy |   {'foo': 'josemy's houñse'}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)