mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-02 14:15:46 +00:00
Cassandra is very strict in the CLUSTERING ORDER BY clause which it allows when creating a materialized view - if it appears, it must list all the clustering columns of the view. Scylla is less strict - a subset of the clustering columns may be specified. But Scylla was *too* lenient - a user could specify non-clustering columns and even non-existent columns and Scylla would not fail the MV creation. This patch fixes that - with it MV creation fails if anything besides clustering columns are listed on CLUSTERING ORDER BY. An xfailing test we had for this case no longer fails after this patch so its xfail mark is removed. We also add a few more corner cases to the tests. This patch also fixs one C++ test which had exactly the error that this patch detects - the test author tried to use the partition key, instead of the clustering key, in CLUSTERING ORDER BY (this error had no effect because the specified order, "asc", was the default anyway). Fixes #10767 Signed-off-by: Nadav Har'El <nyh@scylladb.com> Closes #12885