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

2021-04-06 Thread Edward Ribeiro (Jira)


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

Edward Ribeiro commented on CASSANDRA-16482:


No problem. Thanks again for the awesome work. The C* community really stands 
out. :) 

> 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-rc1, 4.0
>
>  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] [Commented] (CASSANDRA-16482) CQL schema generated by DESCRIBE KEYSPACE fails to import with custom indexes

2021-04-06 Thread Benjamin Lerer (Jira)


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

Benjamin Lerer commented on CASSANDRA-16482:


[~eribeiro] People are doing their best to release RC as soon as possible. I do 
not know how long it will take after that before it is available in the maven 
repo.

> 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-rc1, 4.0
>
>  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] [Commented] (CASSANDRA-16482) CQL schema generated by DESCRIBE KEYSPACE fails to import with custom indexes

2021-04-04 Thread Edward Ribeiro (Jira)


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

Edward Ribeiro commented on CASSANDRA-16482:


[~blerer] Thanks for catch and fix this! Please, do you have any idea when 
4.0-rc1 will be available at https://repo.maven.apache.org/maven2 ? 

> 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-rc1, 4.0
>
>  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] [Commented] (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:comment-tabpanel=17295415#comment-17295415
 ] 

Benjamin Lerer commented on CASSANDRA-16482:


Thanks for the promt review [~brandon.williams]

> 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] [Commented] (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:comment-tabpanel=17295382#comment-17295382
 ] 

Brandon Williams commented on CASSANDRA-16482:
--

LGTM, +1.

> 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] [Commented] (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:comment-tabpanel=17295380#comment-17295380
 ] 

Benjamin Lerer commented on CASSANDRA-16482:


Some DTests are failing but it is unrelated to the change as they do not test 
that part of the code.

> 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] [Commented] (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:comment-tabpanel=17295288#comment-17295288
 ] 

Brandon Williams commented on CASSANDRA-16482:
--

Good catch.  I'm +1 if CI doesn't horribly blow up, will try to check back 
later when it's all set.

> 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] [Commented] (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:comment-tabpanel=17295264#comment-17295264
 ] 

Benjamin Lerer commented on CASSANDRA-16482:


The problem was due to the fact that the {{appendCqlTo}} method in 
{{IndexMetadata}} was not using the correct variable. I added some tests to 
check the fix for DESCRIBE statement and when we output the schema for the 
backups.

[PR|https://github.com/apache/cassandra/pull/915] and CI results: 
[j8|https://app.circleci.com/pipelines/github/blerer/cassandra/109/workflows/3ce76197-3a65-40e6-b8d3-4f2c758b3696],
 
[j11|https://app.circleci.com/pipelines/github/blerer/cassandra/109/workflows/e0a80b74-3c72-4d12-b4a2-e6e40f1eecd7]



> 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