[
https://issues.apache.org/jira/browse/CASSANDRA-15908?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Brandon Williams updated CASSANDRA-15908:
-----------------------------------------
Status: Ready to Commit (was: Review In Progress)
> Improve messaging on indexing frozen collections
> ------------------------------------------------
>
> Key: CASSANDRA-15908
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15908
> Project: Cassandra
> Issue Type: Improvement
> Components: CQL/Semantics
> Reporter: Rocco Varela
> Assignee: Rocco Varela
> Priority: Low
> Fix For: 4.x
>
> Time Spent: 50m
> Remaining Estimate: 0h
>
> When attempting to create an index on a frozen collection the error message
> produced can be improved to provide more detail about the problem and
> possible workarounds. Currently, a user will receive a message indicating
> "...Frozen collections only support full() indexes" which is not immediately
> clear for users new to Cassandra indexing and datatype compatibility.
> Here is an example:
> {code:java}
> cqlsh> CREATE KEYSPACE test WITH replication = {'class': 'SimpleStrategy',
> 'replication_factor': 1};
> cqlsh> CREATE TABLE test.mytable ( id int primary key, addresses
> frozen<set<text>> );
> cqlsh> CREATE INDEX mytable_addresses_idx on test.mytable (addresses);
> InvalidRequest: Error from server: code=2200 [Invalid query] message="Cannot
> create values() index on frozen column addresses. Frozen collections only
> support full() indexes"{code}
>
> I'm proposing possibly enhancing the messaging to something like this.
> {quote}Cannot create values() index on frozen column addresses. Frozen
> collections only support indexes on the entire data structure due to
> immutability constraints of being frozen, wrap your frozen column with the
> full() target type to index properly.
> {quote}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]