[jira] [Updated] (CASSANDRA-16482) CQL schema generated by DESCRIBE KEYSPACE fails to import with custom indexes

2021-03-04 Thread Benjamin Lerer (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-16482?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Benjamin Lerer updated CASSANDRA-16482:
---
  Fix Version/s: 4.0
  Since Version: 4.0-beta1
Source Control Link: 
https://github.com/apache/cassandra/commit/87db9187c1cc56f0dcdcd4b1ae50a31f4191f580
 Resolution: Fixed
 Status: Resolved  (was: Ready to Commit)

Committed into trunk at 87db9187c1cc56f0dcdcd4b1ae50a31f4191f580

> CQL schema generated by DESCRIBE KEYSPACE fails to import with custom indexes
> -
>
> Key: CASSANDRA-16482
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16482
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL/Syntax
>Reporter: Mike Adamson
>Assignee: Benjamin Lerer
>Priority: Normal
> Fix For: 4.0, 4.0-rc
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> The CQL schema generated by a DESCRIBE KEYSPACE on a keyspace with a table 
> that contains a custom index cannot be reimported.
> The reimport of the schema fails with:
> {noformat}
> InvalidRequest: Error from server: code=2200 [Invalid query] message="Cannot 
> specify class_name as a CUSTOM option"
> {noformat}
> The reason for this is that the custom index definition is created with 
> {{class_name}} and {{target}} options added to it in it's {{WITH OPTIONS}} 
> section. This is then picked up by the {{IndexAttributes.validate}} method 
> that specifically rejects them.
> Note: This only seems to happen if the custom index was created with options 
> in the first place. So if the {{CREATE CUSTOM INDEX}} statement didn't 
> originally have a {{WITH OPTIONS}} section then it won't have the 
> {{class_name}} and {{target}} options added to it.
> h3. Steps to reproduce
> {noformat}
> CREATE KEYSPACE test WITH replication = {'class': 'SimpleStrategy', 
> 'replication_factor': '1'};
> CREATE TABLE test.test (id int PRIMARY KEY, value text);
> CREATE CUSTOM INDEX ON test.test(value) USING 
> 'org.apache.cassandra.index.sasi.SASIIndex' WITH OPTIONS = {'is_literal': 
> 'false'};
> DESCRIBE KEYSPACE test;
> {noformat}
> Trying to import the resultant schema will fail.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-16482) CQL schema generated by DESCRIBE KEYSPACE fails to import with custom indexes

2021-03-04 Thread Brandon Williams (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-16482?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Brandon Williams updated CASSANDRA-16482:
-
Status: Ready to Commit  (was: Review In Progress)

> CQL schema generated by DESCRIBE KEYSPACE fails to import with custom indexes
> -
>
> Key: CASSANDRA-16482
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16482
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL/Syntax
>Reporter: Mike Adamson
>Assignee: Benjamin Lerer
>Priority: Normal
> Fix For: 4.0-rc
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> The CQL schema generated by a DESCRIBE KEYSPACE on a keyspace with a table 
> that contains a custom index cannot be reimported.
> The reimport of the schema fails with:
> {noformat}
> InvalidRequest: Error from server: code=2200 [Invalid query] message="Cannot 
> specify class_name as a CUSTOM option"
> {noformat}
> The reason for this is that the custom index definition is created with 
> {{class_name}} and {{target}} options added to it in it's {{WITH OPTIONS}} 
> section. This is then picked up by the {{IndexAttributes.validate}} method 
> that specifically rejects them.
> Note: This only seems to happen if the custom index was created with options 
> in the first place. So if the {{CREATE CUSTOM INDEX}} statement didn't 
> originally have a {{WITH OPTIONS}} section then it won't have the 
> {{class_name}} and {{target}} options added to it.
> h3. Steps to reproduce
> {noformat}
> CREATE KEYSPACE test WITH replication = {'class': 'SimpleStrategy', 
> 'replication_factor': '1'};
> CREATE TABLE test.test (id int PRIMARY KEY, value text);
> CREATE CUSTOM INDEX ON test.test(value) USING 
> 'org.apache.cassandra.index.sasi.SASIIndex' WITH OPTIONS = {'is_literal': 
> 'false'};
> DESCRIBE KEYSPACE test;
> {noformat}
> Trying to import the resultant schema will fail.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-16482) CQL schema generated by DESCRIBE KEYSPACE fails to import with custom indexes

2021-03-04 Thread Brandon Williams (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-16482?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Brandon Williams updated CASSANDRA-16482:
-
Reviewers: Brandon Williams, Brandon Williams  (was: Brandon Williams)
   Brandon Williams, Brandon Williams
   Status: Review In Progress  (was: Patch Available)

> CQL schema generated by DESCRIBE KEYSPACE fails to import with custom indexes
> -
>
> Key: CASSANDRA-16482
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16482
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL/Syntax
>Reporter: Mike Adamson
>Assignee: Benjamin Lerer
>Priority: Normal
> Fix For: 4.0-rc
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> The CQL schema generated by a DESCRIBE KEYSPACE on a keyspace with a table 
> that contains a custom index cannot be reimported.
> The reimport of the schema fails with:
> {noformat}
> InvalidRequest: Error from server: code=2200 [Invalid query] message="Cannot 
> specify class_name as a CUSTOM option"
> {noformat}
> The reason for this is that the custom index definition is created with 
> {{class_name}} and {{target}} options added to it in it's {{WITH OPTIONS}} 
> section. This is then picked up by the {{IndexAttributes.validate}} method 
> that specifically rejects them.
> Note: This only seems to happen if the custom index was created with options 
> in the first place. So if the {{CREATE CUSTOM INDEX}} statement didn't 
> originally have a {{WITH OPTIONS}} section then it won't have the 
> {{class_name}} and {{target}} options added to it.
> h3. Steps to reproduce
> {noformat}
> CREATE KEYSPACE test WITH replication = {'class': 'SimpleStrategy', 
> 'replication_factor': '1'};
> CREATE TABLE test.test (id int PRIMARY KEY, value text);
> CREATE CUSTOM INDEX ON test.test(value) USING 
> 'org.apache.cassandra.index.sasi.SASIIndex' WITH OPTIONS = {'is_literal': 
> 'false'};
> DESCRIBE KEYSPACE test;
> {noformat}
> Trying to import the resultant schema will fail.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-16482) CQL schema generated by DESCRIBE KEYSPACE fails to import with custom indexes

2021-03-04 Thread Benjamin Lerer (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-16482?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Benjamin Lerer updated CASSANDRA-16482:
---
Test and Documentation Plan: The patch add additional unit tests to 
{{DescribeStatementTest}} and {{SchemaCQLHelperTest}}
 Status: Patch Available  (was: In Progress)

> CQL schema generated by DESCRIBE KEYSPACE fails to import with custom indexes
> -
>
> Key: CASSANDRA-16482
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16482
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL/Syntax
>Reporter: Mike Adamson
>Assignee: Benjamin Lerer
>Priority: Normal
> Fix For: 4.0-rc
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> The CQL schema generated by a DESCRIBE KEYSPACE on a keyspace with a table 
> that contains a custom index cannot be reimported.
> The reimport of the schema fails with:
> {noformat}
> InvalidRequest: Error from server: code=2200 [Invalid query] message="Cannot 
> specify class_name as a CUSTOM option"
> {noformat}
> The reason for this is that the custom index definition is created with 
> {{class_name}} and {{target}} options added to it in it's {{WITH OPTIONS}} 
> section. This is then picked up by the {{IndexAttributes.validate}} method 
> that specifically rejects them.
> Note: This only seems to happen if the custom index was created with options 
> in the first place. So if the {{CREATE CUSTOM INDEX}} statement didn't 
> originally have a {{WITH OPTIONS}} section then it won't have the 
> {{class_name}} and {{target}} options added to it.
> h3. Steps to reproduce
> {noformat}
> CREATE KEYSPACE test WITH replication = {'class': 'SimpleStrategy', 
> 'replication_factor': '1'};
> CREATE TABLE test.test (id int PRIMARY KEY, value text);
> CREATE CUSTOM INDEX ON test.test(value) USING 
> 'org.apache.cassandra.index.sasi.SASIIndex' WITH OPTIONS = {'is_literal': 
> 'false'};
> DESCRIBE KEYSPACE test;
> {noformat}
> Trying to import the resultant schema will fail.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-16482) CQL schema generated by DESCRIBE KEYSPACE fails to import with custom indexes

2021-03-03 Thread Brandon Williams (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-16482?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Brandon Williams updated CASSANDRA-16482:
-
 Bug Category: Parent values: Correctness(12982)
   Complexity: Normal
Discovered By: User Report
Fix Version/s: 4.0-rc
 Severity: Normal
   Status: Open  (was: Triage Needed)

> CQL schema generated by DESCRIBE KEYSPACE fails to import with custom indexes
> -
>
> Key: CASSANDRA-16482
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16482
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL/Syntax
>Reporter: Mike Adamson
>Assignee: Benjamin Lerer
>Priority: Normal
> Fix For: 4.0-rc
>
>
> The CQL schema generated by a DESCRIBE KEYSPACE on a keyspace with a table 
> that contains a custom index cannot be reimported.
> The reimport of the schema fails with:
> {noformat}
> InvalidRequest: Error from server: code=2200 [Invalid query] message="Cannot 
> specify class_name as a CUSTOM option"
> {noformat}
> The reason for this is that the custom index definition is created with 
> {{class_name}} and {{target}} options added to it in it's {{WITH OPTIONS}} 
> section. This is then picked up by the {{IndexAttributes.validate}} method 
> that specifically rejects them.
> Note: This only seems to happen if the custom index was created with options 
> in the first place. So if the {{CREATE CUSTOM INDEX}} statement didn't 
> originally have a {{WITH OPTIONS}} section then it won't have the 
> {{class_name}} and {{target}} options added to it.
> h3. Steps to reproduce
> {noformat}
> CREATE KEYSPACE test WITH replication = {'class': 'SimpleStrategy', 
> 'replication_factor': '1'};
> CREATE TABLE test.test (id int PRIMARY KEY, value text);
> CREATE CUSTOM INDEX ON test.test(value) USING 
> 'org.apache.cassandra.index.sasi.SASIIndex' WITH OPTIONS = {'is_literal': 
> 'false'};
> DESCRIBE KEYSPACE test;
> {noformat}
> Trying to import the resultant schema will fail.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org