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

[GitHub] [cassandra] qannap commented on a diff in pull request #2398: CASSANDRA-17818-3.11: Fix error message handling when trying to use CLUSTERING ORDER with non-clustering column

qannap commented on code in PR #2398:
URL: https://github.com/apache/cassandra/pull/2398#discussion_r1228404014


##########
src/java/org/apache/cassandra/cql3/statements/CreateTableStatement.java:
##########
@@ -342,8 +344,13 @@ public ParsedStatement.Prepared prepare(Types udts) throws RequestValidationExce
             // If we give a clustering order, we must explicitly do so for all aliases and in the order of the PK
             if (!properties.definedOrdering.isEmpty())
             {
-                if (properties.definedOrdering.size() > columnAliases.size())
-                    throw new InvalidRequestException("Only clustering key columns can be defined in CLUSTERING ORDER directive");
+                List<ColumnIdentifier> nonClusterColumn = properties.definedOrdering.keySet().stream()

Review Comment:
   Good point! Already changed in the new commit!



-- 
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