mike-tr-adamson commented on code in PR #2673:
URL: https://github.com/apache/cassandra/pull/2673#discussion_r1358470397


##########
src/java/org/apache/cassandra/cql3/statements/SelectStatement.java:
##########
@@ -281,14 +288,29 @@ public ResultMessage.Rows execute(QueryState state, 
QueryOptions options, long q
 
         Selectors selectors = selection.newSelectors(options);
         AggregationSpecification aggregationSpec = getAggregationSpec(options);
-        ReadQuery query = getQuery(options, state.getClientState(), 
selectors.getColumnFilter(),
-                                   nowInSec, userLimit, userPerPartitionLimit, 
pageSize, aggregationSpec);
+        DataLimits limit = getDataLimits(userLimit, userPerPartitionLimit, 
pageSize, aggregationSpec);
+
+        // Handle additional validation for topK queries
+        if (restrictions.isTopK())
+        {
+            checkFalse(aggregationSpec != null, TOPK_AGGREGATION_ERROR);
+
+            checkFalse(options.getConsistency() != ConsistencyLevel.ONE &&

Review Comment:
   I have pushed a commit that, hopefully, meets both of these requirements.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to