cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "madheswaran (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-8421) Cassandra 2.1.1 UDT not returning value for LIST type as UDT
Date Tue, 09 Dec 2014 10:06:13 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-8421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14239219#comment-14239219
] 

madheswaran commented on CASSANDRA-8421:
----------------------------------------

h3. Another Issue in Search:
------------------------------
First Query searching list value {color:red} {key: 'contactNumber', value: '8888888889007'}
 {color}
{code:title=First Query |borderStyle=solid}
1) SELECT * from entity WHERE status_key < 3 and field_values contains {key: 'contactNumber',
value: '8888888889007'} and domain = 'pcs.com' allow filtering ;

 entity_id                            | begining | domain  | domain_type | entity_template_name
   | field_values                                                                        
                                                                                         
                                                                                         
                                                                                         
                                                                                         
      | global_entity_type | revision_time                        | status_key | status_name
| uuid
--------------------------------------+----------+---------+-------------+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------+--------------------------------------+------------+-------------+------
 723d4295-1ad2-4aba-8638-5bdd6b3be8b7 |        1 | pcs.com |        null | DefaultPCSTemplate_User
| [{key: 'access', value: '[{"entityId":"c0e30978-9662-4d6e-9503-7fcfd4d7693c"},{"entityId":"9af1e1e2-05bd-4929-a2cc-ff9e6526992c"}]'},
{key: 'contactNumber', value: '8888888889007'}, {key: 'firstName', value: 'James'}, {key:
'lastName', value: 'Smith'}, {key: 'primaryEmail', value: 'james9007@pcs.com'}, {key: 'roleName',
value: 'admin'}, {key: 'userName', value: 'James9007'}, {key: 'userType', value: 'some'},
{key: 'password', value: 'James9007'}] |               USER | 5a0dad10-7edf-11e4-8d47-4b86331ee8c7
|          0 |      ACTIVE | null
(1 rows)
{code}


2) Same query but searching another value of list {color:red} {key: 'access', value: '[{"entityId":"c0e30978-9662-4d6e-9503-7fcfd4d7693c"},{"entityId":"9af1e1e2-05bd-4929-a2cc-ff9e6526992c"}]'}
{color}   from same *ROW* but it is not returning any value.
{code:title=SecondQuery |borderStyle=solid}
SELECT * from entity WHERE status_key < 3 and field_values contains  {key: 'access', value:
'[{"entityId":"c0e30978-9662-4d6e-9503-7fcfd4d7693c"},{"entityId":"9af1e1e2-05bd-4929-a2cc-ff9e6526992c"}]'}
and domain = 'pcs.com' allow filtering ;

(0 rows)

{code}



Index Created for both status_key and field_values
{code}
CREATE INDEX entity_begining_idx_1 ON galaxy_development.entity (begining);
CREATE INDEX entity_domain_idx_1 ON galaxy_development.entity (domain);
CREATE INDEX entity_field_values_idx_1 ON galaxy_development.entity (field_values);
CREATE INDEX entity_global_entity_type_idx_1 ON galaxy_development.entity (global_entity_type);
CREATE INDEX entity_revision_time_idx_1 ON galaxy_development.entity (revision_time);
CREATE INDEX entity_status_key_idx_1 ON galaxy_development.entity (status_key);

{code}

> Cassandra 2.1.1 UDT not returning value for LIST type as UDT
> ------------------------------------------------------------
>
>                 Key: CASSANDRA-8421
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8421
>             Project: Cassandra
>          Issue Type: Bug
>          Components: API
>         Environment: single node cassandra 
>            Reporter: madheswaran
>            Assignee: Sylvain Lebresne
>             Fix For: 3.0, 2.1.3
>
>         Attachments: 8421-unittest.txt, entity_data.csv
>
>
> I using List and its data type is UDT.
> UDT:
> {code}
> CREATE TYPE
> fieldmap (
>  key text,
>  value text
> );
> {code}
> TABLE:
> {code}
> 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
>   ) {code}
> INDEX:
> {code}
> 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 );
> {code}
> QUERY
> {code}
> 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;
> {code}
> 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.



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

Mime
View raw message