Skip to content

Commit f0cb7f1

Browse files
committed
Merge branch 'cassandra-5.0' into trunk
2 parents aa5c3ab + 5ea935d commit f0cb7f1

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

doc/modules/cassandra/pages/developing/cql/ddl.adoc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ include::cassandra:example$BNF/ks_table.bnf[]
2323
----
2424

2525
Both 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
2830
keyspace and table name) to go over the limits of certain file systems).
2931
By default, keyspace and table names are case-insensitive (`myTable` is
3032
equivalent to `mytable`) but case sensitivity can be forced by using

test/unit/org/apache/cassandra/schema/CreateTableValidationTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ public void testCreatingTableWithLongName() throws Throwable
103103
String tableName = "t".repeat(FILENAME_LENGTH - tableIdSuffix);
104104
String tooLongTableName = "l".repeat(FILENAME_LENGTH - tableIdSuffix + 1);
105105

106+
// Assert that the documented value of 222 corresponds to the actual constant.
107+
assertThat(TABLE_NAME_LENGTH).isEqualTo(222);
108+
106109
execute(String.format("CREATE KEYSPACE %s with replication = " +
107110
"{ 'class' : 'SimpleStrategy', 'replication_factor' : 1 }",
108111
keyspaceName));

0 commit comments

Comments
 (0)