Uploaded image for project: 'Apache Cassandra'
  1. Apache Cassandra
  2. CASSANDRA-10263

Insert in Cassandra in a collection, values with single quote

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Not A Problem
    • None
    • None
    • None
    • Normal

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

      Attachments

        1. terminal.png
          38 kB
          Jduarte

        Issue Links

          Activity

            People

              blerer Benjamin Lerer
              jduarte Jduarte
              Benjamin Lerer
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: