cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philip Thompson (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-10263) Insert in Cassandra in a collection, values with single quote
Date Thu, 03 Sep 2015 19:36:45 GMT

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

Philip Thompson updated CASSANDRA-10263:
----------------------------------------
    Reproduced In: 3.0 beta 1, 2.2.1, 2.1.3
    Fix Version/s:     (was: 3.0 beta 1)
                       (was: 2.2.1)
                       (was: 2.1.3)
                   2.2.x
                   2.1.x
                   3.x
      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:  {code}INSERT INTO test (name, foo) VALUES ( 'jos''emy',{'foo':'josemy''s houñse'});{code}

Query: {{SELECT * FROM  test;}}
{code}
 name    | foo
-----------+-----------------------------
 jos'emy | {'foo': 'josemy''s houñse'}
{code}
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:
{code}
 name    | foo
---------+-----------------------------
 jos'emy |   {'foo': 'josemy's houñse'}
{code}

  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'}


Were the versions listed the ones you can reproduce in? Just double checking.

> 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: 3.x, 2.1.x, 2.2.x
>
>         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:  {code}INSERT INTO test (name, foo) VALUES ( 'jos''emy',{'foo':'josemy''s houñse'});{code}
> Query: {{SELECT * FROM  test;}}
> {code}
>  name    | foo
> -----------+-----------------------------
>  jos'emy | {'foo': 'josemy''s houñse'}
> {code}
> 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:
> {code}
>  name    | foo
> ---------+-----------------------------
>  jos'emy |   {'foo': 'josemy's houñse'}
> {code}



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

Mime
View raw message