[jira] [Commented] (CASSANDRA-8421) Cassandra 2.1.1 UDT not returning value for LIST type as UDT
[ https://issues.apache.org/jira/browse/CASSANDRA-8421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14239219#comment-14239219 ] madheswaran commented on CASSANDRA-8421: h3. Another Issue in Search: -- First Query searching list value {color:red} {key: 'contactNumber', value: '89007'} {color} {code:title=First Query |borderStyle=solid} 1) SELECT * from entity WHERE status_key 3 and field_values contains {key: 'contactNumber', value: '89007'} 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: '89007'}, {key: 'firstName', value: 'James'}, {key: 'lastName', value: 'Smith'}, {key: 'primaryEmail', value: 'james9...@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 listfieldmap, 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:
[jira] [Commented] (CASSANDRA-8421) Cassandra 2.1.1 UDT not returning value for LIST type as UDT
[ https://issues.apache.org/jira/browse/CASSANDRA-8421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14237671#comment-14237671 ] Sylvain Lebresne commented on CASSANDRA-8421: - [~philipthompson] Since you're able to reproduce, could you extract that test into a unit test (using CQLTester)? 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: 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 listfieldmap, 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_22'} 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)
[jira] [Commented] (CASSANDRA-8421) Cassandra 2.1.1 UDT not returning value for LIST type as UDT
[ https://issues.apache.org/jira/browse/CASSANDRA-8421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14237722#comment-14237722 ] madheswaran commented on CASSANDRA-8421: I never used CQLTester?.. Please can you tell me where I can Download CQLTester 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: 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 listfieldmap, 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_22'} 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)
[jira] [Commented] (CASSANDRA-8421) Cassandra 2.1.1 UDT not returning value for LIST type as UDT
[ https://issues.apache.org/jira/browse/CASSANDRA-8421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14237864#comment-14237864 ] Philip Thompson commented on CASSANDRA-8421: [~slebresne], yes, I will attach today. But I must insist, I really am only able to reproduce this issue when there is not an index on status_key. I will attach unit tests for both scenarios, regardless. [~madheswaran], CQLTester is one of the classes inside Apache Cassandra's unit test framework. It is included alongside the source code in the Apache Cassandra git repository. 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: 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 listfieldmap, 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_22'} 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)
[jira] [Commented] (CASSANDRA-8421) Cassandra 2.1.1 UDT not returning value for LIST type as UDT
[ https://issues.apache.org/jira/browse/CASSANDRA-8421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14237189#comment-14237189 ] Philip Thompson commented on CASSANDRA-8421: [~madheswaran] I was able to reproduce your issue on 2.1.2. I have found that if there is an index on field_values, but not on status_key, your problem reproduces exactly as described. If there is an index on both field_values and on status_key, the correct data is returned every time. I am not sure if the index is supposed to be required, so I am reassigning to someone more familiar with secondary indexes. 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: Philip Thompson Fix For: 3.0, 2.1.3 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 listfieldmap, 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_22'} 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)
[jira] [Commented] (CASSANDRA-8421) Cassandra 2.1.1 UDT not returning value for LIST type as UDT
[ https://issues.apache.org/jira/browse/CASSANDRA-8421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14237427#comment-14237427 ] madheswaran commented on CASSANDRA-8421: Philip Thompson : Index was already created for status_key, field_values and etc. Please find the index details: CREATE INDEX entity_begining_idx_1 ON galaxy_dev.entity (begining); CREATE INDEX entity_domain_idx_1 ON galaxy_dev.entity (domain); CREATE INDEX field ON galaxy_dev.entity (field_values); CREATE INDEX entity_global_entity_type_idx_1 ON galaxy_dev.entity (global_entity_type); CREATE INDEX entity_revision_time_idx_1 ON galaxy_dev.entity (revision_time); CREATE INDEX stat ON galaxy_dev.entity (status_key); 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 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 listfieldmap, 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_22'} 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)
[jira] [Commented] (CASSANDRA-8421) Cassandra 2.1.1 UDT not returning value for LIST type as UDT
[ https://issues.apache.org/jira/browse/CASSANDRA-8421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14237435#comment-14237435 ] madheswaran commented on CASSANDRA-8421: Philip Thompson: Exported the stored data into CSV file and attached here. 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: 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 listfieldmap, 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_22'} 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)
[jira] [Commented] (CASSANDRA-8421) Cassandra 2.1.1 UDT not returning value for LIST type as UDT
[ https://issues.apache.org/jira/browse/CASSANDRA-8421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14237054#comment-14237054 ] madheswaran commented on CASSANDRA-8421: It is typo error. I used frozen keyword for UDT . CREATE TYPE galaxy_dev.fieldmap ( key text, value text ); CREATE TABLE galaxy_dev.entity ( entity_id uuid PRIMARY KEY, begining int, domain text, domain_type text, entity_template_name text, field_values listfrozenfieldmap, global_entity_type text, revision_time timeuuid, status_key int, status_name text, uuid timeuuid ) Even I tried with latest release Cassandra 2.1.2 and the issue is reproduced. :( Total Records inserted was 20 cqlsh:galaxy_dev SELECT count(*) from entity; count --- 20 SELECT * from entity where status_key = 3 allow filtering ; it returns 17 records SELECT * from entity where field_values CONTAINS {key: 'state', value: 'Dubai'} it returns 19 records SELECT * from entity where field_values CONTAINS {key: 'state', value: 'Dubai'} and status_key = 3 allow filtering; returns only 1 record. ( but expected is 17 records ). Sample Data which inserted: cqlsh:master_db SELECT * FROM entity limit 1; entity_id| begining | domain | domain_type | entity_template_name | field_values
[jira] [Commented] (CASSANDRA-8421) Cassandra 2.1.1 UDT not returning value for LIST type as UDT
[ https://issues.apache.org/jira/browse/CASSANDRA-8421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14237056#comment-14237056 ] madheswaran commented on CASSANDRA-8421: This issue is not reproduced in lesser records ( 4 or 5 records) when record count get increased then it behaves abnormally. 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: Philip Thompson Fix For: 3.0, 2.1.3 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 listfieldmap, 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_22'} 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)
[jira] [Commented] (CASSANDRA-8421) Cassandra 2.1.1 UDT not returning value for LIST type as UDT
[ https://issues.apache.org/jira/browse/CASSANDRA-8421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14234341#comment-14234341 ] Philip Thompson commented on CASSANDRA-8421: Which Cassandra version are you using? 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 Fix For: 3.0, 2.1.3 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 listfieldmap, 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_22'} 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. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-8421) Cassandra 2.1.1 UDT not returning value for LIST type as UDT
[ https://issues.apache.org/jira/browse/CASSANDRA-8421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14234358#comment-14234358 ] Philip Thompson commented on CASSANDRA-8421: With 2.1.1, when creating the table as defined, I see the following error {code}code=2200 [Invalid query] message=Non-frozen User-Defined types are not supported, please use frozen{code}. With the current 2.1-HEAD code, I see {code}code=2200 [Invalid query] message=Non-frozen collections are not allowed inside collections: listfieldmap{code}. So the problem is definitely that you have a UDT in a list. I am confused as to how you are creating the table though. Are you using the queries exactly as specified on C* 2.1.1? What driver or client are you using? 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: Philip Thompson Fix For: 3.0, 2.1.3 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 listfieldmap, 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_22'} 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)