Imagine ck1, ck2, v columns. For "CLUSTERING ORDER ck1 ASC, v DESC" error msg will suggest that information for ck2 is missing. But if you add it it will still be wrong as "v" cannot be used. So the problem here is really about using non-clustering column rather than about not providing information about some clustering column.
The following is example from 3.11, but the code is the same in 4.0, 4.1, trunk:
We need to be sure that we return to the user the same correct error message in all three cases and it should be "Only clustering key columns can be defined in CLUSTERING ORDER directive"
- This is where we handle the issue incorrectly as proved by the example. The easiest way to handle this issue would be to check the key set content of clusteringOrder.
- It would be good also to add more unit tests in CreateTableValidationTest to cover different cases.
- I suggest we create patch first for 3.11 and then we can propagate it up to the next versions.