cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject [4/6] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.9
Date Tue, 05 Jul 2016 16:34:55 GMT
Merge branch 'cassandra-3.0' into cassandra-3.9


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/237330ad
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/237330ad
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/237330ad

Branch: refs/heads/trunk
Commit: 237330ad2046ad4367a63db8e9bfb7a1abee9c26
Parents: f8cf5b5 a9a6e5f
Author: Carl Yeksigian <carl@apache.org>
Authored: Tue Jul 5 12:25:09 2016 -0400
Committer: Carl Yeksigian <carl@apache.org>
Committed: Tue Jul 5 12:25:09 2016 -0400

----------------------------------------------------------------------
 .../cql3/statements/CreateViewStatement.java    |  2 +-
 .../org/apache/cassandra/cql3/ViewTest.java     | 31 ++++++++++++++++++++
 2 files changed, 32 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/237330ad/src/java/org/apache/cassandra/cql3/statements/CreateViewStatement.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/cql3/statements/CreateViewStatement.java
index 3ea88eb,13e528c..013adbc
--- a/src/java/org/apache/cassandra/cql3/statements/CreateViewStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/CreateViewStatement.java
@@@ -310,11 -311,12 +310,11 @@@ public class CreateViewStatement extend
                                                 List<ColumnIdentifier> columns,
                                                 StatementRestrictions restrictions)
      {
 -        ColumnIdentifier identifier = raw.prepare(cfm);
 -        ColumnDefinition def = cfm.getColumnDefinition(identifier);
 +        ColumnDefinition def = raw.prepare(cfm);
  
 -        boolean isPk = basePK.contains(identifier);
 +        boolean isPk = basePK.contains(def.name);
          if (!isPk && hasNonPKColumn)
-             throw new InvalidRequestException(String.format("Cannot include more than one
non-primary key column '%s' in materialized view partition key", def.name));
 -            throw new InvalidRequestException(String.format("Cannot include more than one
non-primary key column '%s' in materialized view primary key", identifier));
++            throw new InvalidRequestException(String.format("Cannot include more than one
non-primary key column '%s' in materialized view primary key", def.name));
  
          // We don't need to include the "IS NOT NULL" filter on a non-composite partition
key
          // because we will never allow a single partition key to be NULL


Mime
View raw message