You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "driftx (via GitHub)" <gi...@apache.org> on 2023/06/09 01:52:45 UTC

[GitHub] [cassandra] driftx commented on a diff in pull request #2399: CASSANDRA-17818-4.0 or more: Fix error message handling when trying to use CLUSTERING ORDER with non-clustering column

driftx commented on code in PR #2399:
URL: https://github.com/apache/cassandra/pull/2399#discussion_r1223744839


##########
src/java/org/apache/cassandra/cql3/statements/schema/CreateTableStatement.java:
##########
@@ -218,6 +218,13 @@ public TableMetadata.Builder builder(Types types)
         if (clusteringOrder.size() > clusteringColumns.size())
             throw ire("Only clustering columns can be defined in CLUSTERING ORDER directive");
 
+        for (ColumnIdentifier orederId: clusteringOrder.keySet())
+        {
+            if (!clusteringColumns.contains(orederId)){

Review Comment:
   +1, good catch



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org