cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ifesdj...@apache.org
Subject [17/25] cassandra git commit: Merge branch 'cassandra-3.11' into trunk
Date Mon, 06 Nov 2017 15:50:27 GMT
Merge branch 'cassandra-3.11' into trunk


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

Branch: refs/heads/trunk
Commit: 38bd20e0510048c3c93781afd05efdf31594c115
Parents: 5b09543 6d429cd
Author: Alex Petrov <oleksandr.petrov@gmail.com>
Authored: Mon Nov 6 16:38:30 2017 +0100
Committer: Alex Petrov <oleksandr.petrov@gmail.com>
Committed: Mon Nov 6 16:38:30 2017 +0100

----------------------------------------------------------------------
 NEWS.txt                      | 20 +++++++++++++++++++
 doc/native_protocol_v4.spec   |  4 ++++
 doc/source/cql/appendices.rst | 22 +++++++++++++++++++++
 src/antlr/Lexer.g             |  4 ++++
 src/antlr/Parser.g            | 40 +++++++++++++++++++++++++-------------
 5 files changed, 76 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/38bd20e0/NEWS.txt
----------------------------------------------------------------------
diff --cc NEWS.txt
index 09a9a7b,9812b22..30cad13
--- a/NEWS.txt
+++ b/NEWS.txt
@@@ -91,8 -40,28 +91,28 @@@ Upgradin
        storage format change, see CASSANDRA-13826. For append-only use case, you
        may still use this feature with a startup flag: "-Dcassandra.mv.allow_filtering_nonkey_columns_unsafe=true"
  
+ Compact Storage (only when upgrading from 3.X or any version lower than 3.0.15)
+ ---------------
+     - Starting version 4.0, Thrift and COMPACT STORAGE is no longer supported.
+       'ALTER ... DROP COMPACT STORAGE' statement makes Compact Tables CQL-compatible,
+       exposing internal structure of Thrift/Compact Tables. You can find more details
+       on exposed internal structure under: 
+       http://cassandra.apache.org/doc/latest/cql/appendices.html#appendix-c-dropping-compact-storage
+ 
+       For uninterrupted cluster upgrades, drivers now support 'NO_COMPACT' startup option.
+       Supplying this flag will have same effect as 'DROP COMPACT STORAGE', but only for
the
+       current connection.
+ 
+       In order to upgrade, clients supporting a non-compact schema view can be rolled out
+       gradually. When all the clients are updated 'ALTER ... DROP COMPACT STORAGE' can be
+       executed. After dropping compact storage, ’NO_COMPACT' option will have no effect
+       after that.
+ 
+ 
+ Materialized Views
+ -------------------
  
 -Materialized Views (only when upgrading from 3.X or any version lower than 3.0.15)
 +Materialized Views (only when upgrading from any version lower than 3.0.15 (3.0 series)
or 3.11.1 (3.X series))
  ---------------------------------------------------------------------------------------
      - Cassandra will no longer allow dropping columns on tables with Materialized Views.
      - A change was made in the way the Materialized View timestamp is computed, which

http://git-wip-us.apache.org/repos/asf/cassandra/blob/38bd20e0/src/antlr/Lexer.g
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/38bd20e0/src/antlr/Parser.g
----------------------------------------------------------------------
diff --cc src/antlr/Parser.g
index 185f968,26074b8..553d643
--- a/src/antlr/Parser.g
+++ b/src/antlr/Parser.g
@@@ -922,13 -805,14 +922,13 @@@ alterTableStatement returns [AlterTable
          Long deleteTimestamp = null;
      }
      : K_ALTER K_COLUMNFAMILY cf=columnFamilyName
-           ( K_ALTER id=cident  K_TYPE v=comparatorType  { type = AlterTableStatement.Type.ALTER;
} { colNameList.add(new AlterTableStatementColumn(id,v)); }
-           | K_ADD  (        (id=cident   v=comparatorType   b1=cfisStatic { colNameList.add(new
AlterTableStatementColumn(id,v,b1)); })
-                      | ('('  id1=cident  v1=comparatorType  b1=cfisStatic { colNameList.add(new
AlterTableStatementColumn(id1,v1,b1)); }
-                        ( ',' idn=cident  vn=comparatorType  bn=cfisStatic { colNameList.add(new
AlterTableStatementColumn(idn,vn,bn)); } )* ')' ) ) { type = AlterTableStatement.Type.ADD;
}
-           | K_DROP ( (         id=cident  { colNameList.add(new AlterTableStatementColumn(id));
}
-                       | ('('  id1=cident { colNameList.add(new AlterTableStatementColumn(id1));
}
-                         ( ',' idn=cident { colNameList.add(new AlterTableStatementColumn(idn));
} )* ')') )
+           ( K_ALTER id=schema_cident  K_TYPE v=comparatorType  { type = AlterTableStatement.Type.ALTER;
} { colNameList.add(new AlterTableStatementColumn(id,v)); }
+           | K_ADD  (        (aid=schema_cident  v=comparatorType   b1=cfisStatic { colNameList.add(new
AlterTableStatementColumn(aid,v,b1)); })
+                      | ('('  id1=schema_cident  v1=comparatorType  b1=cfisStatic { colNameList.add(new
AlterTableStatementColumn(id1,v1,b1)); }
+                        ( ',' idn=schema_cident  vn=comparatorType  bn=cfisStatic { colNameList.add(new
AlterTableStatementColumn(idn,vn,bn)); } )* ')' ) ) { type = AlterTableStatement.Type.ADD;
}
 -          | K_DROP K_COMPACT K_STORAGE          { type = AlterTableStatement.Type.DROP_COMPACT_STORAGE;
}        
+           | K_DROP ( (        id=schema_cident  { colNameList.add(new AlterTableStatementColumn(id));
}
+                       | ('('  id1=schema_cident { colNameList.add(new AlterTableStatementColumn(id1));
}
+                         ( ',' idn=schema_cident { colNameList.add(new AlterTableStatementColumn(idn));
} )* ')') )
                       ( K_USING K_TIMESTAMP t=INTEGER { deleteTimestamp = Long.parseLong(Constants.Literal.integer($t.text).getText());
})? ) { type = AlterTableStatement.Type.DROP; }
            | K_WITH  properties[attrs]                 { type = AlterTableStatement.Type.OPTS;
}
            | K_RENAME                                  { type = AlterTableStatement.Type.RENAME;
}
@@@ -1290,10 -1174,20 +1290,20 @@@ userPassword[RoleOptions opts
  // Column Identifiers.  These need to be treated differently from other
  // identifiers because the underlying comparator is not necessarily text. See
  // CASSANDRA-8178 for details.
+ // Also, we need to support the internal of the super column map (for backward
+ // compatibility) which is empty (we only want to allow this is in data manipulation
+ // queries, not in schema defition etc).
 -cident returns [ColumnDefinition.Raw id]
 -    : EMPTY_QUOTED_NAME    { $id = ColumnDefinition.Raw.forQuoted(""); }
 -    | t=IDENT              { $id = ColumnDefinition.Raw.forUnquoted($t.text); }
 -    | t=QUOTED_NAME        { $id = ColumnDefinition.Raw.forQuoted($t.text); }
 -    | k=unreserved_keyword { $id = ColumnDefinition.Raw.forUnquoted(k); }
 +cident returns [ColumnMetadata.Raw id]
++    : EMPTY_QUOTED_NAME    { $id = ColumnMetadata.Raw.forQuoted(""); }
++    | t=IDENT              { $id = ColumnMetadata.Raw.forUnquoted($t.text); }
++    | t=QUOTED_NAME        { $id = ColumnMetadata.Raw.forQuoted($t.text); }
++    | k=unreserved_keyword { $id = ColumnMetadata.Raw.forUnquoted(k); }
+     ;
+ 
 -schema_cident returns [ColumnDefinition.Raw id]
 -    : t=IDENT              { $id = ColumnDefinition.Raw.forUnquoted($t.text); }
 -    | t=QUOTED_NAME        { $id = ColumnDefinition.Raw.forQuoted($t.text); }
 -    | k=unreserved_keyword { $id = ColumnDefinition.Raw.forUnquoted(k); }
++schema_cident returns [ColumnMetadata.Raw id]
 +    : t=IDENT              { $id = ColumnMetadata.Raw.forUnquoted($t.text); }
 +    | t=QUOTED_NAME        { $id = ColumnMetadata.Raw.forQuoted($t.text); }
 +    | k=unreserved_keyword { $id = ColumnMetadata.Raw.forUnquoted(k); }
      ;
  
  // Column identifiers where the comparator is known to be text


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


Mime
View raw message