Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 16277200B36 for ; Wed, 6 Jul 2016 18:12:13 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 14CC4160A55; Wed, 6 Jul 2016 16:12:13 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 5E438160A73 for ; Wed, 6 Jul 2016 18:12:12 +0200 (CEST) Received: (qmail 3463 invoked by uid 500); 6 Jul 2016 16:12:11 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 3230 invoked by uid 99); 6 Jul 2016 16:12:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Jul 2016 16:12:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 235972C02AC for ; Wed, 6 Jul 2016 16:12:11 +0000 (UTC) Date: Wed, 6 Jul 2016 16:12:11 +0000 (UTC) From: "Alex Petrov (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (CASSANDRA-11495) Rename of field in user defined type causes ArrayIndexOutOfBoundsException in select JSON * MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 06 Jul 2016 16:12:13 -0000 [ https://issues.apache.org/jira/browse/CASSANDRA-11495?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alex Petrov resolved CASSANDRA-11495. ------------------------------------- Resolution: Duplicate This is a duplicate of [CASSANDRA-11146], validated using the following unit test: {code} @Test public void userTypeJsonTest() throws Throwable { String type = createType("CREATE TYPE %s (a int, b int)"); createTable("CREATE TABLE %s (a int PRIMARY KEY, b frozen<" + KEYSPACE + "." + type + ">)"); execute("INSERT INTO %s (a, b) VALUES(1, {a:1, b:1})"); execute("ALTER TYPE " + KEYSPACE + "." + type + " ADD c int"); execute("ALTER TYPE " + KEYSPACE + "." + type + " ADD d int"); assertRowsIgnoringOrder(execute("SELECT JSON * FROM %s"), row("{\"a\": 1, \"b\": {\"a\": 1, \"b\": 1, \"c\": null, \"d\": null}}")); } {code} > Rename of field in user defined type causes ArrayIndexOutOfBoundsException in select JSON * > ------------------------------------------------------------------------------------------- > > Key: CASSANDRA-11495 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11495 > Project: Cassandra > Issue Type: Bug > Components: CQL > Reporter: Timothy Wang > Assignee: Alex Petrov > Attachments: cassandra_log_output.txt, error.cql > > > Executing the attached error.cql causes java.lang.ArrayIndexOutOfBoundsException. This reproduces 100% of the time in my environment. > nodetool -h localhost version > objc[14803]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined. > ReleaseVersion: 3.3 > cqlsh -f error.cql > [json] > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > {"list_id": "3ae31af7-e72b-11e5-9f1c-77e17196cbff", "card_id": "b2f059bb-ecc0-11e5-937c-4760eea11554", "owner_id": "8c02459b-dcaf-42dd-874a-41e19ba15075", "book_name": "Hop on Pop (I Can Read It All By Myself)", "publication_info": {"author": "Dr. Seuss", "publisher": "Beginner Books / Random House", "creative_roles": [], "publication_date": "1963-02-12"}} > (1 rows) > twangs-MacBook-Pro:migrations twang$ cqlsh -f error.cql > peer | release_version > ------+----------------- > (0 rows) > release_version > ----------------- > 3.3 > (1 rows) > [json] > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > {"list_id": "3ae31af7-e72b-11e5-9f1c-77e17196cbff", "card_id": "b2f059bb-ecc0-11e5-937c-4760eea11554", "owner_id": "8c02459b-dcaf-42dd-874a-41e19ba15075", "book_name": "Hop on Pop (I Can Read It All By Myself)", "publication_info": {"author": "Dr. Seuss", "publisher": "Beginner Books / Random House", "creative_roles": [], "publication_date": "1963-02-12"}} > (1 rows) > error.cql:49:ServerError: -- This message was sent by Atlassian JIRA (v6.3.4#6332)