[
https://issues.apache.org/jira/browse/CASSANDRA-11146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tyler Hobbs updated CASSANDRA-11146:
------------------------------------
Since Version: 2.2.0
Reviewer: Benjamin Lerer
Fix Version/s: 3.x
3.0.x
2.2.x
Component/s: CQL
The fix is pretty straightforward, we just need to handle the set of values on
disk not including the new field. All merges above 2.2 are clean:
||branch||testall||dtest||
|[CASSANDRA-11146|https://github.com/thobbs/cassandra/tree/CASSANDRA-11146]|[testall|http://cassci.datastax.com/view/Dev/view/thobbs/job/thobbs-CASSANDRA-11146-testall]|[dtest|http://cassci.datastax.com/view/Dev/view/thobbs/job/thobbs-CASSANDRA-11146-dtest]|
|[CASSANDRA-11146-3.0|https://github.com/thobbs/cassandra/tree/CASSANDRA-11146-3.0]|[testall|http://cassci.datastax.com/view/Dev/view/thobbs/job/thobbs-CASSANDRA-11146-3.0-testall]|[dtest|http://cassci.datastax.com/view/Dev/view/thobbs/job/thobbs-CASSANDRA-11146-3.0-dtest]|
|[CASSANDRA-11146-trunk|https://github.com/thobbs/cassandra/tree/CASSANDRA-11146-trunk]|[testall|http://cassci.datastax.com/view/Dev/view/thobbs/job/thobbs-CASSANDRA-11146-trunk-testall]|[dtest|http://cassci.datastax.com/view/Dev/view/thobbs/job/thobbs-CASSANDRA-11146-trunk-dtest]|
> Adding field to UDT definition breaks SELECT JSON
> -------------------------------------------------
>
> Key: CASSANDRA-11146
> URL: https://issues.apache.org/jira/browse/CASSANDRA-11146
> Project: Cassandra
> Issue Type: Bug
> Components: CQL
> Environment: cqlsh 5.0.1 | Cassandra 2.2.4 | CQL spec 3.3.1 | Native
> protocol v4
> cqlsh 5.0.1 | Cassandra 3.3.0 | CQL spec 3.4.0 | Native protocol v4
> Reporter: Alexander
> Assignee: Tyler Hobbs
> Fix For: 2.2.x, 3.0.x, 3.x
>
>
> {noformat}
> CREATE TYPE test_type ( i int);
> CREATE TABLE test_table (
> id int PRIMARY KEY,
> model frozen<test_type>
> );
> INSERT INTO test_table JSON '{"id": 1, "model": {"i": 123}}';
> SELECT JSON * FROM test_table;
> {noformat}
> success
> {noformat}
> ALTER TYPE test_type ADD b boolean;
> SELECT JSON * FROM test_table;
> {noformat}
> error
> {noformat}
> ServerError: <ErrorMessage code=0000 [Server error]
> message="java.lang.ArrayIndexOutOfBoundsException: 1">
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)