File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
doc/modules/cassandra/pages/developing/cql
test/unit/org/apache/cassandra/schema Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -23,8 +23,10 @@ include::cassandra:example$BNF/ks_table.bnf[]
2323----
2424
2525Both keyspace and table name should be comprised of only alphanumeric
26- characters, cannot be empty and are limited in size to 48 characters
27- (that limit exists mostly to avoid filenames (which may include the
26+ or underscore characters and cannot be empty.
27+ Keyspace name is limited in size to 48 characters, while
28+ table name is limited in size to 222 characters
29+ (those limits exist mostly to avoid filenames (which may include the
2830keyspace and table name) to go over the limits of certain file systems).
2931By default, keyspace and table names are case-insensitive (`myTable` is
3032equivalent to `mytable`) but case sensitivity can be forced by using
Original file line number Diff line number Diff line change @@ -112,6 +112,9 @@ public void testCreatingTableWithLongName() throws Throwable
112112 String tableName = "t" .repeat (FILENAME_LENGTH - tableIdSuffix );
113113 String tooLongTableName = "l" .repeat (FILENAME_LENGTH - tableIdSuffix + 1 );
114114
115+ // Assert that the documented value of 222 corresponds to the actual constant.
116+ assertThat (TABLE_NAME_LENGTH ).isEqualTo (222 );
117+
115118 execute (String .format ("CREATE KEYSPACE %s with replication = " +
116119 "{ 'class' : 'SimpleStrategy', 'replication_factor' : 1 }" ,
117120 keyspaceName ));
You can’t perform that action at this time.
0 commit comments