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

Cassandra 2.1.1 & Cassandra 2.1.2 UDT not returning value for LIST type as UDT

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 2.1.3
    • Legacy/CQL
    • None
    • single node cassandra

    • Normal

    Description

      I using List and its data type is UDT.

      UDT:

      CREATE TYPE
      
      fieldmap (
      
       key text,
       value text
      );
      

      TABLE:

      CREATE TABLE entity (
      
        entity_id uuid PRIMARY KEY,
        begining int,
        domain text,
        domain_type text,
        entity_template_name text,
        field_values list<fieldmap>,
        global_entity_type text,
        revision_time timeuuid,
        status_key int,
        status_name text,
        uuid timeuuid
        ) 

      INDEX:

      CREATE INDEX entity_domain_idx_1 ON galaxy_dev.entity (domain);
      
      CREATE INDEX entity_field_values_idx_1 ON galaxy_dev.entity (field_values);
      
      CREATE INDEX entity_global_entity_type_idx_1 ON galaxy_dev.entity (gen_type );
      

      QUERY

      SELECT * FROM entity WHERE status_key < 3 and field_values contains {key: 'userName', value: 'Sprint5_200002'} and gen_type = 'USER' and domain = 'S4_1017.abc.com' allow filtering;
      

      The above query return value for some row and not for many rows but those rows and data's are exist.

      Observation:
      If I execute query with other than field_maps, then it returns value. I suspect the problem with LIST with UDT.

      I have single node cassadra DB. Please let me know why this strange behavior from cassandra.

      Attachments

        1. 8421-unittest.txt
          5 kB
          Philip Thompson
        2. CASSANDRA-8421.txt
          2 kB
          Benjamin Lerer
        3. entity_data.csv
          127 kB
          madheswaran

        Issue Links

          Activity

            People

              blerer Benjamin Lerer
              madheswaran madheswaran
              Benjamin Lerer
              Tom Hobbs
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: