Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7962618877 for ; Tue, 17 Nov 2015 16:54:47 +0000 (UTC) Received: (qmail 53404 invoked by uid 500); 17 Nov 2015 16:54:47 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 53348 invoked by uid 500); 17 Nov 2015 16:54:47 -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 53316 invoked by uid 99); 17 Nov 2015 16:54:47 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Nov 2015 16:54:47 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id E1B02E03E4; Tue, 17 Nov 2015 16:54:46 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: aleksey@apache.org To: commits@cassandra.apache.org Date: Tue, 17 Nov 2015 16:54:47 -0000 Message-Id: In-Reply-To: <44ba6afa6ce34948b402d88d4975d96e@git.apache.org> References: <44ba6afa6ce34948b402d88d4975d96e@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [2/4] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2 Merge branch 'cassandra-2.1' into cassandra-2.2 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/a68f8bd7 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a68f8bd7 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a68f8bd7 Branch: refs/heads/cassandra-3.1 Commit: a68f8bd700666e87877993107ad1b20ed957c8a8 Parents: 99b82db 5414950 Author: Aleksey Yeschenko Authored: Tue Nov 17 16:47:41 2015 +0000 Committer: Aleksey Yeschenko Committed: Tue Nov 17 16:47:41 2015 +0000 ---------------------------------------------------------------------- CHANGES.txt | 1 + .../cassandra/cql3/statements/AlterTableStatement.java | 3 +++ .../cassandra/cql3/validation/operations/AlterTest.java | 8 ++++++++ 3 files changed, 12 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/a68f8bd7/CHANGES.txt ---------------------------------------------------------------------- diff --cc CHANGES.txt index f5d3416,eea14c8..fb8f89a --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,17 -1,5 +1,18 @@@ -2.1.12 +2.2.4 + * Don't do anticompaction after subrange repair (CASSANDRA-10422) + * Fix SimpleDateType type compatibility (CASSANDRA-10027) + * (Hadoop) fix splits calculation (CASSANDRA-10640) + * (Hadoop) ensure that Cluster instances are always closed (CASSANDRA-10058) + * (cqlsh) show partial trace if incomplete after max_trace_wait (CASSANDRA-7645) + * Use most up-to-date version of schema for system tables (CASSANDRA-10652) + * Deprecate memory_allocator in cassandra.yaml (CASSANDRA-10581,10628) + * Expose phi values from failure detector via JMX and tweak debug + and trace logging (CASSANDRA-9526) + * Fix RangeNamesQueryPager (CASSANDRA-10509) + * Deprecate Pig support (CASSANDRA-10542) + * Reduce contention getting instances of CompositeType (CASSANDRA-10433) +Merged from 2.1: + * Forbid compact clustering column type changes in ALTER TABLE (CASSANDRA-8879) * Reject incremental repair with subrange repair (CASSANDRA-10422) * Add a nodetool command to refresh size_estimates (CASSANDRA-9579) * Shutdown compaction in drain to prevent leak (CASSANDRA-10079) http://git-wip-us.apache.org/repos/asf/cassandra/blob/a68f8bd7/src/java/org/apache/cassandra/cql3/statements/AlterTableStatement.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/a68f8bd7/test/unit/org/apache/cassandra/cql3/validation/operations/AlterTest.java ---------------------------------------------------------------------- diff --cc test/unit/org/apache/cassandra/cql3/validation/operations/AlterTest.java index 566c0ea,a6aad87..2cc8a18 --- a/test/unit/org/apache/cassandra/cql3/validation/operations/AlterTest.java +++ b/test/unit/org/apache/cassandra/cql3/validation/operations/AlterTest.java @@@ -201,20 -200,10 +202,27 @@@ public class AlterTest extends CQLTeste } } + /** + * tests CASSANDRA-10027 + */ + @Test + public void testAlterColumnTypeToDate() throws Throwable + { + createTable("CREATE TABLE %s (key int PRIMARY KEY, c1 int);"); + execute("INSERT INTO %s (key, c1) VALUES (1,1);"); + execute("ALTER TABLE %s ALTER c1 TYPE date;"); + assertRows(execute("SELECT * FROM %s"), row(1, 1)); + + createTable("CREATE TABLE %s (key int PRIMARY KEY, c1 varint);"); + execute("INSERT INTO %s (key, c1) VALUES (1,1);"); + assertInvalidMessage("Cannot change c1 from type varint to type date: types are incompatible.", + "ALTER TABLE %s ALTER c1 TYPE date;"); + } ++ + @Test // tests CASSANDRA-8879 + public void testAlterClusteringColumnTypeInCompactTable() throws Throwable + { + createTable("CREATE TABLE %s (key blob, column1 blob, value blob, PRIMARY KEY ((key), column1)) WITH COMPACT STORAGE"); + assertInvalidThrow(InvalidRequestException.class, "ALTER TABLE %s ALTER column1 TYPE ascii"); + } }