[jira] [Commented] (CASSANDRA-9527) Cannot create secondary index on a table WITH COMPACT STORAGE
[ https://issues.apache.org/jira/browse/CASSANDRA-9527?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14598356#comment-14598356 ] Tyler Hobbs commented on CASSANDRA-9527: The patch looks good, but can you add some unit tests around this and push a branch so that cassci runs the full test suite? Cannot create secondary index on a table WITH COMPACT STORAGE - Key: CASSANDRA-9527 URL: https://issues.apache.org/jira/browse/CASSANDRA-9527 Project: Cassandra Issue Type: Bug Components: Core Environment: cassandra v2.0.13 Reporter: fuggy_yama Assignee: Benjamin Lerer Priority: Minor Fix For: 2.0.x Attachments: 9527.txt In CASSANDRA-8156 it is said that secondary indexes are not allowed on clustering columns in COMPACT tables. However, I found that it is not possible to create a secondary index on the value column in a COMPACT table: CREATE TABLE t ( a INT, b INT, c INT, PRIMARY KEY (a, b) ) WITH COMPACT STORAGE; CREATE INDEX ON t (c); *Bad Request: Secondary indexes are not supported on PRIMARY KEY columns in COMPACT STORAGE tables* -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-9527) Cannot create secondary index on a table WITH COMPACT STORAGE
[ https://issues.apache.org/jira/browse/CASSANDRA-9527?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14569645#comment-14569645 ] Benjamin Lerer commented on CASSANDRA-9527: --- [~thobbs] can you review? Cannot create secondary index on a table WITH COMPACT STORAGE - Key: CASSANDRA-9527 URL: https://issues.apache.org/jira/browse/CASSANDRA-9527 Project: Cassandra Issue Type: Bug Components: Core Environment: cassandra v2.0.13 Reporter: fuggy_yama Assignee: Benjamin Lerer Priority: Minor Fix For: 2.0.x Attachments: 9527.txt In CASSANDRA-8156 it is said that secondary indexes are not allowed on clustering columns in COMPACT tables. However, I found that it is not possible to create a secondary index on the value column in a COMPACT table: CREATE TABLE t ( a INT, b INT, c INT, PRIMARY KEY (a, b) ) WITH COMPACT STORAGE; CREATE INDEX ON t (c); *Bad Request: Secondary indexes are not supported on PRIMARY KEY columns in COMPACT STORAGE tables* -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-9527) Cannot create secondary index on a table WITH COMPACT STORAGE
[ https://issues.apache.org/jira/browse/CASSANDRA-9527?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14569144#comment-14569144 ] Benjamin Lerer commented on CASSANDRA-9527: --- The issue is valid. Our test is: {code} if ((cfm.getCfDef().isCompact || !cfm.getCfDef().isComposite) cd.type != ColumnDefinition.Type.REGULAR) throw new InvalidRequestException(Secondary indexes are not supported on PRIMARY KEY columns in COMPACT STORAGE tables); {code} The problem is that the type of the c column is {{ColumnDefinition.Type.COMPACT_VALUE}} and not {{ColumnDefinition.Type.REGULAR}}. Cannot create secondary index on a table WITH COMPACT STORAGE - Key: CASSANDRA-9527 URL: https://issues.apache.org/jira/browse/CASSANDRA-9527 Project: Cassandra Issue Type: Bug Components: Core Environment: cassandra v2.0.13 Reporter: fuggy_yama Assignee: Benjamin Lerer Priority: Minor Fix For: 2.0.x In CASSANDRA-8156 it is said that secondary indexes are not allowed on clustering columns in COMPACT tables. However, I found that it is not possible to create a secondary index on the value column in a COMPACT table: CREATE TABLE t ( a INT, b INT, c INT, PRIMARY KEY (a, b) ) WITH COMPACT STORAGE; CREATE INDEX ON t (c); *Bad Request: Secondary indexes are not supported on PRIMARY KEY columns in COMPACT STORAGE tables* -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-9527) Cannot create secondary index on a table WITH COMPACT STORAGE
[ https://issues.apache.org/jira/browse/CASSANDRA-9527?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14569146#comment-14569146 ] Benjamin Lerer commented on CASSANDRA-9527: --- The issue is valid. Our test is: {code} if ((cfm.getCfDef().isCompact || !cfm.getCfDef().isComposite) cd.type != ColumnDefinition.Type.REGULAR) throw new InvalidRequestException(Secondary indexes are not supported on PRIMARY KEY columns in COMPACT STORAGE tables); {code} The problem is that the type of the c column is {{ColumnDefinition.Type.COMPACT_VALUE}} and not {{ColumnDefinition.Type.REGULAR}}. Cannot create secondary index on a table WITH COMPACT STORAGE - Key: CASSANDRA-9527 URL: https://issues.apache.org/jira/browse/CASSANDRA-9527 Project: Cassandra Issue Type: Bug Components: Core Environment: cassandra v2.0.13 Reporter: fuggy_yama Assignee: Benjamin Lerer Priority: Minor Fix For: 2.0.x In CASSANDRA-8156 it is said that secondary indexes are not allowed on clustering columns in COMPACT tables. However, I found that it is not possible to create a secondary index on the value column in a COMPACT table: CREATE TABLE t ( a INT, b INT, c INT, PRIMARY KEY (a, b) ) WITH COMPACT STORAGE; CREATE INDEX ON t (c); *Bad Request: Secondary indexes are not supported on PRIMARY KEY columns in COMPACT STORAGE tables* -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-9527) Cannot create secondary index on a table WITH COMPACT STORAGE
[ https://issues.apache.org/jira/browse/CASSANDRA-9527?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14569098#comment-14569098 ] Philip Thompson commented on CASSANDRA-9527: I can confirm this is happening on 2.0.15. [~blerer], should this be possible? If not, then it's just the error message that's wrong. Cannot create secondary index on a table WITH COMPACT STORAGE - Key: CASSANDRA-9527 URL: https://issues.apache.org/jira/browse/CASSANDRA-9527 Project: Cassandra Issue Type: Bug Components: Core Environment: cassandra v2.0.13 Reporter: fuggy_yama Assignee: Benjamin Lerer Priority: Minor Fix For: 2.0.x In CASSANDRA-8156 it is said that secondary indexes are not allowed on clustering columns in COMPACT tables. However, I found that it is not possible to create a secondary index on the value column in a COMPACT table: CREATE TABLE t ( a INT, b INT, c INT, PRIMARY KEY (a, b) ) WITH COMPACT STORAGE; CREATE INDEX ON t (c); *Bad Request: Secondary indexes are not supported on PRIMARY KEY columns in COMPACT STORAGE tables* -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-9527) Cannot create secondary index on a table WITH COMPACT STORAGE
[ https://issues.apache.org/jira/browse/CASSANDRA-9527?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14569314#comment-14569314 ] Benjamin Lerer commented on CASSANDRA-9527: --- Sorry, I was wrong. We support secondary indices only on the compact tables that does not have clustering columns. Which means that we should change the error message for this specific case. Cannot create secondary index on a table WITH COMPACT STORAGE - Key: CASSANDRA-9527 URL: https://issues.apache.org/jira/browse/CASSANDRA-9527 Project: Cassandra Issue Type: Bug Components: Core Environment: cassandra v2.0.13 Reporter: fuggy_yama Assignee: Benjamin Lerer Priority: Minor Fix For: 2.0.x In CASSANDRA-8156 it is said that secondary indexes are not allowed on clustering columns in COMPACT tables. However, I found that it is not possible to create a secondary index on the value column in a COMPACT table: CREATE TABLE t ( a INT, b INT, c INT, PRIMARY KEY (a, b) ) WITH COMPACT STORAGE; CREATE INDEX ON t (c); *Bad Request: Secondary indexes are not supported on PRIMARY KEY columns in COMPACT STORAGE tables* -- This message was sent by Atlassian JIRA (v6.3.4#6332)