Skip to content

Commit 5ea935d

Browse files
committed
Merge branch 'cassandra-4.1' into cassandra-5.0
2 parents a3ad539 + 7b312d4 commit 5ea935d

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
@@ -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));

0 commit comments

Comments
 (0)