adelapena commented on code in PR #2673:
URL: https://github.com/apache/cassandra/pull/2673#discussion_r1360586490
##########
src/java/org/apache/cassandra/cql3/statements/SelectStatement.java:
##########
@@ -109,6 +112,15 @@ public class SelectStatement implements
CQLStatement.SingleKeyspaceCqlStatement
private static final NoSpamLogger noSpamLogger =
NoSpamLogger.getLogger(SelectStatement.logger, 1, TimeUnit.MINUTES);
public static final int DEFAULT_PAGE_SIZE = 10000;
+ public static final String TOPK_CONSISTENCY_LEVEL_ERROR = "Top-K queries
can only be run with consistency level ONE/LOCAL_ONE. Consistency level %s was
used.";
+ public static final String TOPK_LIMIT_ERROR = "Top-K queries must have a
limit specified and the limit must be less than the query page size";
+ public static final String TOPK_PARTITION_LIMIT_ERROR = "Top-K queries do
not support per-partition limits";
+ public static final String TOPK_AGGREGATION_ERROR = "Top-K queries can not
be run with aggregation";
+ public static final String TOPK_CONSISTENCY_LEVEL_WARNING = "Top-K queries
can only be run with consistency level ONE " +
+ "/ LOCAL_ONE /
NODE_LOCAL. Consistency level %s was used. " +
+ "Downgrading
to consistency level %s.";
Review Comment:
The message says that top-k queries can only be run with
ONE/LOCAL_ONE/NODE_LOCAL. However, the code at `execute` will rewrite any code
distinct to ONE/LOCAL_ONE to be transformed into either ONE or LOCAL_ONE. So
`NODE_LOCAL` will always be rewritten to `LOCAL_ONE`, producing the confusing
message `Top-K queries can only be run with consistency level ONE / LOCAL_ONE /
NODE_LOCAL. Consistency level NODE_LOCAL was used. Downgrading to consistency
level LOCAL_ONE.`
--
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]