adelapena commented on code in PR #2673:
URL: https://github.com/apache/cassandra/pull/2673#discussion_r1358100772
##########
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:
As discussed on Slack conversation, we should do the same with the check for
page size right below. So a page size below the query limit will produce a
client warning and be ignored.
--
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]