mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-02 06:05:53 +00:00
We know (verified by existing tests) that null keys are not allowed - neither as partition keys nor clustering keys. In issue #9352 a question was raised of whether an *empty string* is allowed as as a key on a base table (not a materialized view or index). The following tests confirm that the current situation is as follows: 1. An empty string is perfectly legal as a clustering key. 2. An empty string is NOT ALLOWED as a partition key - the error "Key may not be empty" is reported if this is attempted. 3. If the partition key is compound (multiple partition-key columns) then any or all of them may be empty strings. These tests pass the same on both Cassandra and Scylla, showing that this bizarre (and undocumented) behavior is identical in both. Refs #9352. Signed-off-by: Nadav Har'El <nyh@scylladb.com> Message-Id: <20210922131310.293846-1-nyh@scylladb.com>