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

Can not insert an empty map.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 1.2.1
    • None
    • None
    • Low

    Description

      It is not possible to insert an empty map. It looks like the "{}" is reserved only for Set.

      So when for table:

      CREATE TABLE users (
          id text PRIMARY KEY,
          surname text,
          favs map<text, text>
      )
      

      I try to insert map without any elements:

      cqlsh:test> insert into users(id,surname,favs) values('aaa','aaa',{});
      

      I get:

       Bad Request: Set operations are only supported on Set typed columns, but org.apache.cassandra.db.marshal.MapType(org.apache.cassandra.db.marshal.UTF8Type,org.apache.cassandra.db.marshal.UTF8Type) given.
      text could not be lexed at line 1, char 63
      

      Attachments

        1. 5141.txt
          4 kB
          Sylvain Lebresne

        Activity

          People

            slebresne Sylvain Lebresne
            krzysztof cieslinski Krzysztof Cieslinski Cognitum
            Sylvain Lebresne
            Jonathan Ellis
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: