[jira] [Commented] (CASSANDRA-13228) SASI index on partition key part doesn't match
[ https://issues.apache.org/jira/browse/CASSANDRA-13228?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15964618#comment-15964618 ] Andrés de la Peña commented on CASSANDRA-13228: --- Here is a patch forbidding the creation of SASI indexes over partition key columns during index options validation: ||[3.11|https://github.com/apache/cassandra/compare/cassandra-3.11...adelapena:13228-3.11]|[utests|http://cassci.datastax.com/view/Dev/view/adelapena/job/adelapena-13228-3.11-testall/]|[dtests|http://cassci.datastax.com/view/Dev/view/adelapena/job/adelapena-13228-3.11-dtest/]| ||[trunk|https://github.com/apache/cassandra/compare/trunk...adelapena:13228-trunk]|[utests|http://cassci.datastax.com/view/Dev/view/adelapena/job/adelapena-13228-trunk-testall/]|[dtests|http://cassci.datastax.com/view/Dev/view/adelapena/job/adelapena-13228-trunk-dtest/]| > SASI index on partition key part doesn't match > -- > > Key: CASSANDRA-13228 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13228 > Project: Cassandra > Issue Type: Bug > Components: sasi >Reporter: Hannu Kröger >Assignee: Andrés de la Peña > Labels: sasi > > I created a SASI index on first part of multi-part partition key. Running > query using that index doesn't seem to work. > I have here a log of queries that should indicate the issue: > {code}cqlsh:test> CREATE TABLE test1(name text, event_date date, data_type > text, bytes int, PRIMARY KEY ((name, event_date), data_type)); > cqlsh:test> CREATE CUSTOM INDEX test_index ON test1(name) USING > 'org.apache.cassandra.index.sasi.SASIIndex'; > cqlsh:test> INSERT INTO test1(name, event_date, data_type, bytes) > values('1234', '2010-01-01', 'sensor', 128); > cqlsh:test> INSERT INTO test1(name, event_date, data_type, bytes) > values('abcd', '2010-01-02', 'sensor', 500); > cqlsh:test> select * from test1 where NAME = '1234'; > name | event_date | data_type | bytes > --++---+--- > (0 rows) > cqlsh:test> CONSISTENCY ALL; > Consistency level set to ALL. > cqlsh:test> select * from test1 where NAME = '1234'; > name | event_date | data_type | bytes > --++---+--- > (0 rows){code} > Note! Creating a SASI index on single part partition key, SASI index creation > fails. Apparently this should not work at all, so is it about missing > validation on index creation? -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (CASSANDRA-13228) SASI index on partition key part doesn't match
[ https://issues.apache.org/jira/browse/CASSANDRA-13228?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16002711#comment-16002711 ] Alex Petrov commented on CASSANDRA-13228: - "yet" suggest we're going to support them one day :) jk +1, thank you for the patch! > SASI index on partition key part doesn't match > -- > > Key: CASSANDRA-13228 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13228 > Project: Cassandra > Issue Type: Bug > Components: sasi >Reporter: Hannu Kröger >Assignee: Andrés de la Peña > Labels: sasi > > I created a SASI index on first part of multi-part partition key. Running > query using that index doesn't seem to work. > I have here a log of queries that should indicate the issue: > {code}cqlsh:test> CREATE TABLE test1(name text, event_date date, data_type > text, bytes int, PRIMARY KEY ((name, event_date), data_type)); > cqlsh:test> CREATE CUSTOM INDEX test_index ON test1(name) USING > 'org.apache.cassandra.index.sasi.SASIIndex'; > cqlsh:test> INSERT INTO test1(name, event_date, data_type, bytes) > values('1234', '2010-01-01', 'sensor', 128); > cqlsh:test> INSERT INTO test1(name, event_date, data_type, bytes) > values('abcd', '2010-01-02', 'sensor', 500); > cqlsh:test> select * from test1 where NAME = '1234'; > name | event_date | data_type | bytes > --++---+--- > (0 rows) > cqlsh:test> CONSISTENCY ALL; > Consistency level set to ALL. > cqlsh:test> select * from test1 where NAME = '1234'; > name | event_date | data_type | bytes > --++---+--- > (0 rows){code} > Note! Creating a SASI index on single part partition key, SASI index creation > fails. Apparently this should not work at all, so is it about missing > validation on index creation? -- This message was sent by Atlassian JIRA (v6.3.15#6346) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-13228) SASI index on partition key part doesn't match
[ https://issues.apache.org/jira/browse/CASSANDRA-13228?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16004362#comment-16004362 ] Andrés de la Peña commented on CASSANDRA-13228: --- Committed as [fbf14a5ebde737eff3b4e6c06ddfb6a4652a6c77|https://github.com/apache/cassandra/commit/fbf14a5ebde737eff3b4e6c06ddfb6a4652a6c77], thanks for the review > SASI index on partition key part doesn't match > -- > > Key: CASSANDRA-13228 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13228 > Project: Cassandra > Issue Type: Bug > Components: sasi >Reporter: Hannu Kröger >Assignee: Andrés de la Peña > Labels: sasi > > I created a SASI index on first part of multi-part partition key. Running > query using that index doesn't seem to work. > I have here a log of queries that should indicate the issue: > {code}cqlsh:test> CREATE TABLE test1(name text, event_date date, data_type > text, bytes int, PRIMARY KEY ((name, event_date), data_type)); > cqlsh:test> CREATE CUSTOM INDEX test_index ON test1(name) USING > 'org.apache.cassandra.index.sasi.SASIIndex'; > cqlsh:test> INSERT INTO test1(name, event_date, data_type, bytes) > values('1234', '2010-01-01', 'sensor', 128); > cqlsh:test> INSERT INTO test1(name, event_date, data_type, bytes) > values('abcd', '2010-01-02', 'sensor', 500); > cqlsh:test> select * from test1 where NAME = '1234'; > name | event_date | data_type | bytes > --++---+--- > (0 rows) > cqlsh:test> CONSISTENCY ALL; > Consistency level set to ALL. > cqlsh:test> select * from test1 where NAME = '1234'; > name | event_date | data_type | bytes > --++---+--- > (0 rows){code} > Note! Creating a SASI index on single part partition key, SASI index creation > fails. Apparently this should not work at all, so is it about missing > validation on index creation? -- This message was sent by Atlassian JIRA (v6.3.15#6346) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-13228) SASI index on partition key part doesn't match
[ https://issues.apache.org/jira/browse/CASSANDRA-13228?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15868940#comment-15868940 ] Hannu Kröger commented on CASSANDRA-13228: -- There is a related ticket where a more thorough fix for the problem is proposed. However this could be resolved with an additional validation. > SASI index on partition key part doesn't match > -- > > Key: CASSANDRA-13228 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13228 > Project: Cassandra > Issue Type: Bug >Reporter: Hannu Kröger > > I created a SASI index on first part of multi-part partition key. Running > query using that index doesn't seem to work. > I have here a log of queries that should indicate the issue: > {code}cqlsh:test> CREATE TABLE test1(name text, event_date date, data_type > text, bytes int, PRIMARY KEY ((name, event_date), data_type)); > cqlsh:test> CREATE CUSTOM INDEX test_index ON test1(name) USING > 'org.apache.cassandra.index.sasi.SASIIndex'; > cqlsh:test> INSERT INTO test1(name, event_date, data_type, bytes) > values('1234', '2010-01-01', 'sensor', 128); > cqlsh:test> INSERT INTO test1(name, event_date, data_type, bytes) > values('abcd', '2010-01-02', 'sensor', 500); > cqlsh:test> select * from test1 where NAME = '1234'; > name | event_date | data_type | bytes > --++---+--- > (0 rows) > cqlsh:test> CONSISTENCY ALL; > Consistency level set to ALL. > cqlsh:test> select * from test1 where NAME = '1234'; > name | event_date | data_type | bytes > --++---+--- > (0 rows){code} > Note1 Creating a SASI index on single part partition key, SASI index creation > fails. Apparently this should not work at all, so is it about missing > validation on index creation? -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (CASSANDRA-13228) SASI index on partition key part doesn't match
[ https://issues.apache.org/jira/browse/CASSANDRA-13228?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15869926#comment-15869926 ] Alex Petrov commented on CASSANDRA-13228: - We can (and probably should) just add a validation before the real solution is implemented. Creating an index should fail if it's not supported. > SASI index on partition key part doesn't match > -- > > Key: CASSANDRA-13228 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13228 > Project: Cassandra > Issue Type: Bug > Components: sasi >Reporter: Hannu Kröger > Labels: sasi > > I created a SASI index on first part of multi-part partition key. Running > query using that index doesn't seem to work. > I have here a log of queries that should indicate the issue: > {code}cqlsh:test> CREATE TABLE test1(name text, event_date date, data_type > text, bytes int, PRIMARY KEY ((name, event_date), data_type)); > cqlsh:test> CREATE CUSTOM INDEX test_index ON test1(name) USING > 'org.apache.cassandra.index.sasi.SASIIndex'; > cqlsh:test> INSERT INTO test1(name, event_date, data_type, bytes) > values('1234', '2010-01-01', 'sensor', 128); > cqlsh:test> INSERT INTO test1(name, event_date, data_type, bytes) > values('abcd', '2010-01-02', 'sensor', 500); > cqlsh:test> select * from test1 where NAME = '1234'; > name | event_date | data_type | bytes > --++---+--- > (0 rows) > cqlsh:test> CONSISTENCY ALL; > Consistency level set to ALL. > cqlsh:test> select * from test1 where NAME = '1234'; > name | event_date | data_type | bytes > --++---+--- > (0 rows){code} > Note! Creating a SASI index on single part partition key, SASI index creation > fails. Apparently this should not work at all, so is it about missing > validation on index creation? -- This message was sent by Atlassian JIRA (v6.3.15#6346)