[
https://issues.apache.org/jira/browse/CASSANDRA-19889?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17883737#comment-17883737
]
Stefan Miklosovic commented on CASSANDRA-19889:
-----------------------------------------------
[CASSANDRA-19889-4.0|https://github.com/instaclustr/cassandra/tree/CASSANDRA-19889-4.0]
{noformat}
java11_pre-commit_tests
✓ j11_build 1m 42s
✓ j11_cqlsh-dtests-py2-no-vnodes 5m 14s
✓ j11_cqlsh-dtests-py2-with-vnodes 5m 28s
✓ j11_cqlsh_dtests_py3 5m 21s
✓ j11_cqlsh_dtests_py311 5m 45s
✓ j11_cqlsh_dtests_py311_vnode 6m 7s
✓ j11_cqlsh_dtests_py38 5m 39s
✓ j11_cqlsh_dtests_py38_vnode 6m 28s
✓ j11_cqlsh_dtests_py3_vnode 6m 26s
✓ j11_cqlshlib_tests 5m 26s
✓ j11_dtests 32m 3s
✓ j11_dtests_vnode 35m 51s
✓ j11_jvm_dtests 13m 10s
✓ j11_unit_tests 7m 31s
✓ j11_unit_tests_repeat 14m 59s
java11_separate_tests
java8_pre-commit_tests
java8_separate_tests
{noformat}
[java11_pre-commit_tests|https://app.circleci.com/pipelines/github/instaclustr/cassandra/4769/workflows/8b10ed2c-f50b-4e57-b60c-d52908fa2152]
[java11_separate_tests|https://app.circleci.com/pipelines/github/instaclustr/cassandra/4769/workflows/ea713489-8e4b-43fd-9775-99e2888eea9a]
[java8_pre-commit_tests|https://app.circleci.com/pipelines/github/instaclustr/cassandra/4769/workflows/aee292e7-7438-4d58-9978-0bfd25448a56]
[java8_separate_tests|https://app.circleci.com/pipelines/github/instaclustr/cassandra/4769/workflows/1be1bb56-276d-4c71-bd22-3aa03541581e]
> Indexing a frozen collection that is the clustering key and reversed is
> rejected
> --------------------------------------------------------------------------------
>
> Key: CASSANDRA-19889
> URL: https://issues.apache.org/jira/browse/CASSANDRA-19889
> Project: Cassandra
> Issue Type: Bug
> Components: CQL/Interpreter
> Reporter: David Capwell
> Assignee: Sunil Ramchandra Pawar
> Priority: Normal
> Fix For: 4.0.x, 4.1.x, 5.0.x, 5.x
>
> Time Spent: 50m
> Remaining Estimate: 0h
>
> {code}
> CREATE TABLE tbl (
> pk int,
> ck frozen<list<int>>,
> value int,
> PRIMARY KEY(pk, ck)
> )
> WITH CLUSTERING ORDER BY (ck DESC)
> {code}
> If you index “ck” it will fail
> {code}
> CREATE INDEX ON tbl(FULL(ck));
> {code}
> The failure error is
> {code}
> Caused by: org.apache.cassandra.exceptions.InvalidRequestException: full()
> indexes can only be created on frozen collections
> at
> org.apache.cassandra.cql3.statements.schema.AlterSchemaStatement.ire(AlterSchemaStatement.java:222)
> at
> org.apache.cassandra.cql3.statements.schema.CreateIndexStatement.validateIndexTarget(CreateIndexStatement.java:250)
> at
> org.apache.cassandra.cql3.statements.schema.CreateIndexStatement.lambda$apply$1(CreateIndexStatement.java:177)
> {code}
> The reason? We have a ReverseType column! We must “unwrap” the type before
> this check...
> Basic test
> {code}
> schemaChange(format("CREATE TABLE %s.tbl (\n" +
> " pk int,\n" +
> " ck frozen<list<int>>,\n" +
> " value int,\n" +
> " PRIMARY KEY(pk, ck)\n" +
> ")\n" +
> "WITH CLUSTERING ORDER BY (ck DESC)", KEYSPACE));
> schemaChange(format("CREATE INDEX ON %s.tbl(FULL(ck));", KEYSPACE));
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]